Examples of toXSModel()


Examples of com.sun.org.apache.xerces.internal.xni.grammars.XSGrammar.toXSModel()

    private void doSchemaValidation(InputSource wsdlsource, byte[] bytes, Document doc,
                                    StackTraceErrorHandler handler) throws IOException, SAXException {
        if (isSchemaDocument(doc)) {
            XSGrammar xsGrammer = (XSGrammar)preparser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA,
                                                                       copyInputSourceXML(wsdlsource, bytes));
            xsmodelList.add(xsGrammer.toXSModel());

        } else {
            Map schemas = serializeSchemaElements(doc);
            SchemaEntityResolver schemaResolver = (SchemaEntityResolver)preparser.getEntityResolver();
            schemaResolver.setSchemas(schemas);
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.xni.grammars.XSGrammar.toXSModel()

                    XSGrammar xsGrammer = (XSGrammar)preparser
                        .preparseGrammar(XMLGrammarDescription.XML_SCHEMA,
                                         copyInputSourceXML(wsdlsource, tns, schemaBytes, doc
                                             .getXmlEncoding()));
                    xsmodelList.add(xsGrammer.toXSModel());

                } finally {
                    preparser.setErrorHandler(handler);
                }
            }
View Full Code Here

Examples of org.apache.xerces.xni.grammars.XSGrammar.toXSModel()

    private static List<String> loadUserDefined(XMLInputSource source, TypeMapper tm) throws DatatypeFormatException {
        XMLGrammarPreparser parser = new XMLGrammarPreparser();
        parser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
        try {
            XSGrammar xsg = (XSGrammar) parser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA, source);
            org.apache.xerces.xs.XSModel xsm = xsg.toXSModel();
            XSNamedMap map = xsm.getComponents(XSTypeDefinition.SIMPLE_TYPE);
            int numDefs = map.getLength();
            ArrayList<String> names = new ArrayList<String>(numDefs);
            for (int i = 0; i < numDefs; i++) {
                XSSimpleType xstype = (XSSimpleType) map.item(i);
View Full Code Here

Examples of org.apache.xerces.xni.grammars.XSGrammar.toXSModel()

    private static List<String> loadUserDefined(XMLInputSource source, TypeMapper tm) throws DatatypeFormatException {
        XMLGrammarPreparser parser = new XMLGrammarPreparser();
        parser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
        try {
            XSGrammar xsg = (XSGrammar) parser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA, source);
            org.apache.xerces.xs.XSModel xsm = xsg.toXSModel();
            XSNamedMap map = xsm.getComponents(XSTypeDefinition.SIMPLE_TYPE);
            int numDefs = map.getLength();
            ArrayList<String> names = new ArrayList<String>(numDefs);
            for (int i = 0; i < numDefs; i++) {
                XSSimpleType xstype = (XSSimpleType) map.item(i);
View Full Code Here

Examples of org.apache.xerces.xni.grammars.XSGrammar.toXSModel()

        {
          if(grammars[i] instanceof XSGrammar)
          {
          XSGrammar grammar = (XSGrammar)grammars[i];
               
          StringList namespaces = grammar.toXSModel().getNamespaces();
          if(namespaces.contains(targetNamespace))
          {
            oldGrammars.add(pool.removeGrammar(desc));
                  //pool.putGrammar(new XSGrammarHider(grammar, targetNamespace));
          }
View Full Code Here

Examples of org.apache.xerces.xni.grammars.XSGrammar.toXSModel()

      {
        is = new XMLInputSource(null,schema,schema);
      }

      XSGrammar grammar = (XSGrammar)grammarPreparser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA,is);
      xsModel = grammar.toXSModel();
     
      // Here we add the temporiliy removed schema back.
    if (inlineXSD && oldGrammars != null)
    {
      XSDDescription description = new XSDDescription();
View Full Code Here

Examples of org.apache.xerces.xni.grammars.XSGrammar.toXSModel()

       
        grammarPreparser.registerPreparser(XMLGrammarDescription.XML_SCHEMA,null/*schemaLoader*/);
        grammarPreparser.getLoader(XMLGrammarDescription.XML_SCHEMA);

    XSGrammar grammar = (XSGrammar)grammarPreparser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA,is);
    xsModel = grammar.toXSModel();
      }
      catch (Exception e)
      {
        //parser will return null pointer exception if the document is structurally invalid
        errors.add("Schema is structurally invalid.");
View Full Code Here

Examples of org.apache.xerces.xni.grammars.XSGrammar.toXSModel()

    private static List<String> loadUserDefined(XMLInputSource source, TypeMapper tm) throws DatatypeFormatException {
        XMLGrammarPreparser parser = new XMLGrammarPreparser();
        parser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
        try {
            XSGrammar xsg = (XSGrammar) parser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA, source);
            org.apache.xerces.xs.XSModel xsm = xsg.toXSModel();
            XSNamedMap map = xsm.getComponents(XSTypeDefinition.SIMPLE_TYPE);
            int numDefs = map.getLength();
            ArrayList<String> names = new ArrayList<>(numDefs);
            for (int i = 0; i < numDefs; i++) {
                XSSimpleType xstype = (XSSimpleType) map.item(i);
View Full Code Here

Examples of org.apache.xerces.xni.grammars.XSGrammar.toXSModel()

    private static List<String> loadUserDefined(XMLInputSource source, TypeMapper tm) throws DatatypeFormatException {
        XMLGrammarPreparser parser = new XMLGrammarPreparser();
        parser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
        try {
            XSGrammar xsg = (XSGrammar) parser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA, source);
            org.apache.xerces.xs.XSModel xsm = xsg.toXSModel();
            XSNamedMap map = xsm.getComponents(XSTypeDefinition.SIMPLE_TYPE);
            int numDefs = map.getLength();
            ArrayList<String> names = new ArrayList<String>(numDefs);
            for (int i = 0; i < numDefs; i++) {
                XSSimpleType xstype = (XSSimpleType) map.item(i);
View Full Code Here

Examples of org.apache.xerces.xni.grammars.XSGrammar.toXSModel()

    private static List<String> loadUserDefined(XMLInputSource source, TypeMapper tm) throws DatatypeFormatException {
        XMLGrammarPreparser parser = new XMLGrammarPreparser();
        parser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
        try {
            XSGrammar xsg = (XSGrammar) parser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA, source);
            org.apache.xerces.xs.XSModel xsm = xsg.toXSModel();
            XSNamedMap map = xsm.getComponents(XSTypeDefinition.SIMPLE_TYPE);
            int numDefs = map.getLength();
            ArrayList<String> names = new ArrayList<String>(numDefs);
            for (int i = 0; i < numDefs; i++) {
                XSSimpleType xstype = (XSSimpleType) map.item(i);
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.