Examples of XSParser


Examples of org.apache.ws.jaxme.xs.XSParser

    assertEquals(new XsQName((String) null, "b"), attr2_5.getName());
    assertEquals(XSInt.getInstance(), attr2_5.getType());
  }

  public void testAttributeGroups() throws Exception {
    XSParser xsParser = newXSParser();
    testAttributeGroups(xsParser);
    JAXBParser jaxbParser = newJAXBParser();
    testAttributeGroups(jaxbParser);
  }
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

    assertEquals(new XsQName((String) null, "g"), a4_1.getName());
    assertEquals(XSBoolean.getInstance(), a4_1.getType());
  }

  public void testElements() throws Exception {
    XSParser xsParser = newXSParser();
    testElements(xsParser);
    JAXBParser jaxbParser = newJAXBParser();
    testElements(jaxbParser);
  }
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

    assertEquals("AL", enumerations[1].getValue());
    assertEquals("AR", enumerations[2].getValue());
  }

  public void testFacets() throws Exception {
    XSParser xsParser = newXSParser();
    testFacets(xsParser);
    JAXBParser jaxbParser = newJAXBParser();
    testFacets(jaxbParser);
  }
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

    XsQName fooQualified = new XsQName("http://test.com/namespaces", "foo");
    XsQName fooUnQualified = new XsQName((String) null, "foo");
    XsQName barQualified = new XsQName("http://test.com/namespaces", "bar");
    XsQName barUnQualified = new XsQName((String) null, "bar");
   
    XSParser parser = newJAXBParser();
    InputSource isource = new InputSource(new StringReader(pSchema));
    XSSchema schema = parser.parse(isource);
    XSElement[] schemaElements = schema.getElements();
    assertEquals(1, schemaElements.length);
    assertEquals(fooQualified, schemaElements[0].getName());
    XSAttribute[] schemaAttributes = schema.getAttributes();
    assertEquals(1, schemaAttributes.length);
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

      "  </xs:complexType>\n" +
      "</xs:schema>\n";

    InputSource isource = new InputSource(new StringReader(schemaSource));
    isource.setSystemId("testElements.xsd");
    XSParser xsParser = newXSParser();
    XSSchema schema = xsParser.parse(isource);

    XSType[] types = schema.getTypes();
    assertEquals(2, types.length);
    XSType a = types[0];
    assertEquals(new XsQName((String) null, "a"), a.getName());
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

      "  <xs:element name='test' type='xs:string' foo:b='z'/>\n" +
      "</xs:schema>\n";

    InputSource isource = new InputSource(new StringReader(schemaSource));
    isource.setSystemId("testElements.xsd");
    XSParser xsParser = newXSParser();
    XSSchema schema = xsParser.parse(isource);

    Attributes schemaOpenAttrs = schema.getOpenAttributes();
    assertNotNull(schemaOpenAttrs);
    assertEquals(1, schemaOpenAttrs.getLength());
    assertEquals("x", schemaOpenAttrs.getURI(0));
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

        "    </xs:restriction>\n" +
        "  </xs:simpleType>\n" +
        "</xs:schema>\n";
      InputSource isource = new InputSource(new StringReader(schemaSource));
      isource.setSystemId("testSimpleTypeRestriction.xsd");
      XSParser xsParser = newXSParser();
      XSSchema schema = xsParser.parse(isource);
      XSType[] types = schema.getTypes();
      assertEquals(1, types.length);
      XSSimpleType simpleType = assertSimpleType(types[0]);
      assertAtomicType(simpleType);
      XSEnumeration[] enumerations = simpleType.getEnumerations();
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

  }


    public void testSimpleKey() throws Exception {
      XSParser xsParser = newXSParser();
      testSimpleKey(xsParser);
      JAXBParser jaxbParser = newJAXBParser();
      testSimpleKey(jaxbParser);
    }
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

    }

    /** <p>Tests whether xs:documentation may have arbitrary childs.</p>
     */
    public void testDocumentationChilds() throws Exception {
      XSParser xsParser = newXSParser();
        testDocumentationChilds(xsParser);
        JAXBParser jaxbParser = newJAXBParser();
        testDocumentationChilds(jaxbParser);
    }
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser

   public void marshal(Reader schema, ObjectModelProvider provider, Object root, Writer writer)
      throws IOException, SAXException, ParserConfigurationException
   {
      InputSource source = new InputSource(schema);

      XSParser xsParser = new XSParser();
      xsParser.setValidating(false);
      XSSchema xsSchema = xsParser.parse(source);

      this.provider = provider instanceof GenericObjectModelProvider ?
         (GenericObjectModelProvider)provider : new DelegatingObjectModelProvider(provider);

      this.root = root;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.