Package org.apache.xerces.validators.schema

Examples of org.apache.xerces.validators.schema.TraverseSchema$Resolver


                                       XMLMessages.SCHEMA_GENERIC_ERROR, e.getMessage() );
         }

         Document     document   = parser.getDocument(); //Our Grammar

         TraverseSchema tst = null;
         try {
            if (DEBUG_SCHEMA_VALIDATION) {
               System.out.println("I am geting the Schema Document");
            }

            Element root   = null;
            if (document != null) {
                root = document.getDocumentElement();// This is what we pass to TraverserSchema
            }
            if (root == null) {
               reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR, XMLMessages.SCHEMA_GENERIC_ERROR, "Can't get back Schema document's root element :" + loc);
            } else {
               if (uri == null || !uri.equals(root.getAttribute(SchemaSymbols.ATT_TARGETNAMESPACE)) ) {
                  reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR, XMLMessages.SCHEMA_GENERIC_ERROR, "Schema in " + loc + " has a different target namespace " +
                                            "from the one specified in the instance document :" + uri);
               }

               grammar = new SchemaGrammar();
               grammar.setGrammarDocument(document);
 

                    //At this point we should expand the registry table.



              // pass parser's entity resolver (local Resolver), which also has reference to user's
              // entity resolver, and also can fall-back to entityhandler's expandSystemId()
               tst = new TraverseSchema( root, fStringPool, (SchemaGrammar)grammar, fGrammarResolver, fErrorReporter, source.getSystemId(), currentER);
               fGrammarResolver.putGrammar(root.getAttribute("targetNamespace"), grammar);
            }
         } catch (Exception e) {
            e.printStackTrace(System.err);
         }
View Full Code Here


                                       XMLMessages.SCHEMA_GENERIC_ERROR, e.getMessage() );
         }

         Document     document   = fSchemaGrammarParser.getDocument(); //Our Grammar

         TraverseSchema tst = null;
         try {
            if (DEBUG_SCHEMA_VALIDATION) {
               System.out.println("I am geting the Schema Document");
            }

            Element root   = null;
            if (document != null) {
                root = document.getDocumentElement();// This is what we pass to TraverserSchema
            }
            if (root == null) {
               reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR, XMLMessages.SCHEMA_GENERIC_ERROR, "Can't get back Schema document's root element :" + loc);
            } else {
               if (uri == null || !uri.equals(root.getAttribute(SchemaSymbols.ATT_TARGETNAMESPACE)) ) {
                  reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR, XMLMessages.SCHEMA_GENERIC_ERROR, "Schema in " + loc + " has a different target namespace " +
                                            "from the one specified in the instance document :" + uri);
               }

               grammar = new SchemaGrammar();
               grammar.setGrammarDocument(document);
 
                // Since we've just constructed a schema grammar, we should make sure we know what we've done.
                fGrammarIsSchemaGrammar = true;
                fGrammarIsDTDGrammar = false;

                //At this point we should expand the registry table.
                // pass parser's entity resolver (local Resolver), which also has reference to user's
                // entity resolver, and also can fall-back to entityhandler's expandSystemId()
               tst = new TraverseSchema( root, fStringPool, (SchemaGrammar)grammar, fGrammarResolver, fErrorReporter, source.getSystemId(), currentER, getSchemaFullCheckingEnabled());
               //allowing xsi:schemaLocation to appear on any element
               String targetNS =   root.getAttribute("targetNamespace");
               fGrammarNameSpaceIndex = fStringPool.addSymbol(targetNS);

               fGrammarResolver.putGrammar(targetNS, grammar);
View Full Code Here

                                       XMLMessages.SCHEMA_GENERIC_ERROR, e.getMessage() );
         }

         Document     document   = parser.getDocument(); //Our Grammar

         TraverseSchema tst = null;
         try {
            if (DEBUG_SCHEMA_VALIDATION) {
               System.out.println("I am geting the Schema Document");
            }

            Element root   = null;
            if (document != null) {
                root = document.getDocumentElement();// This is what we pass to TraverserSchema
            }
            if (root == null) {
               reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR, XMLMessages.SCHEMA_GENERIC_ERROR, "Can't get back Schema document's root element :" + loc);
            } else {
               if (uri == null || !uri.equals(root.getAttribute(SchemaSymbols.ATT_TARGETNAMESPACE)) ) {
                  reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR, XMLMessages.SCHEMA_GENERIC_ERROR, "Schema in " + loc + " has a different target namespace " +
                                            "from the one specified in the instance document :" + uri);
               }
               grammar = new SchemaGrammar();
               grammar.setGrammarDocument(document);
 
              // pass parser's entity resolver (local Resolver), which also has reference to user's
              // entity resolver, and also can fall-back to entityhandler's expandSystemId()
             
               tst = new TraverseSchema( root, fStringPool, (SchemaGrammar)grammar, fGrammarResolver, fErrorReporter, source.getSystemId(), currentER);
               fGrammarResolver.putGrammar(document.getDocumentElement().getAttribute("targetNamespace"), grammar);
            }
         } catch (Exception e) {
            e.printStackTrace(System.err);
         }
View Full Code Here

                                       XMLMessages.SCHEMA_GENERIC_ERROR, e.getMessage() );
         }

         Document     document   = parser.getDocument(); //Our Grammar

         TraverseSchema tst = null;
         try {
            if (DEBUG_SCHEMA_VALIDATION) {
               System.out.println("I am geting the Schema Document");
            }

            Element root   = null;
            if (document != null) {
                root = document.getDocumentElement();// This is what we pass to TraverserSchema
            }
            if (root == null) {
               reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR, XMLMessages.SCHEMA_GENERIC_ERROR, "Can't get back Schema document's root element :" + loc);
            } else {
               if (uri == null || !uri.equals(root.getAttribute(SchemaSymbols.ATT_TARGETNAMESPACE)) ) {
                  reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR, XMLMessages.SCHEMA_GENERIC_ERROR, "Schema in " + loc + " has a different target namespace " +
                                            "from the one specified in the instance document :" + uri);
               }

               grammar = new SchemaGrammar();
               grammar.setGrammarDocument(document);
 

                    //At this point we should expand the registry table.



              // pass parser's entity resolver (local Resolver), which also has reference to user's
              // entity resolver, and also can fall-back to entityhandler's expandSystemId()
               tst = new TraverseSchema( root, fStringPool, (SchemaGrammar)grammar, fGrammarResolver, fErrorReporter, source.getSystemId(), currentER);
               fGrammarResolver.putGrammar(root.getAttribute("targetNamespace"), grammar);
            }
         } catch (Exception e) {
            e.printStackTrace(System.err);
         }
View Full Code Here

                                       XMLMessages.SCHEMA_GENERIC_ERROR, e.getMessage() );
         }

         Document     document   = parser.getDocument(); //Our Grammar

         TraverseSchema tst = null;
         try {
            if (DEBUG_SCHEMA_VALIDATION) {
               System.out.println("I am geting the Schema Document");
            }

            Element root   = document.getDocumentElement();// This is what we pass to TraverserSchema
            if (root == null) {
               reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR, XMLMessages.SCHEMA_GENERIC_ERROR, "Can't get back Schema document's root element :" + loc);
            } else {
               if (uri == null || !uri.equals(root.getAttribute(SchemaSymbols.ATT_TARGETNAMESPACE)) ) {
                  reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR, XMLMessages.SCHEMA_GENERIC_ERROR, "Schema in " + loc + " has a different target namespace " +
                                            "from the one specified in the instance document :" + uri);
               }
               grammar = new SchemaGrammar();
               grammar.setGrammarDocument(document);
               tst = new TraverseSchema( root, fStringPool, (SchemaGrammar)grammar, fGrammarResolver, fErrorReporter, source.getSystemId());
               fGrammarResolver.putGrammar(document.getDocumentElement().getAttribute("targetNamespace"), grammar);
            }
         } catch (Exception e) {
            e.printStackTrace(System.err);
         }
View Full Code Here

                                           XMLMessages.SCHEMA_GENERIC_ERROR, e.getMessage() );
            }

            Document     document   = parser.getDocument(); //Our Grammar

            TraverseSchema tst = null;
            try {
                if (DEBUG_SCHEMA_VALIDATION) {
                    System.out.println("I am geting the Schema Document");
                }

                Element root   = document.getDocumentElement();// This is what we pass to TraverserSchema
                if (root == null) {
                    reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR, XMLMessages.SCHEMA_GENERIC_ERROR, "Can't get back Schema document's root element :" + loc);
                } else {
                    if (uri == null || !uri.equals(root.getAttribute(SchemaSymbols.ATT_TARGETNAMESPACE)) ) {
                        reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR, XMLMessages.SCHEMA_GENERIC_ERROR, "Schema in " + loc + " has a different target namespace " +
                                                  "from the one specified in the instance document :" + uri);
                    }
                    grammar = new SchemaGrammar();
                    grammar.setGrammarDocument(document);
                    tst = new TraverseSchema( root, fStringPool, (SchemaGrammar)grammar, fGrammarResolver, fErrorReporter, source.getSystemId());
                    fGrammarResolver.putGrammar(document.getDocumentElement().getAttribute("targetNamespace"), grammar);
                }
            } catch (Exception e) {
                e.printStackTrace(System.err);
            }
View Full Code Here

                                       XMLMessages.SCHEMA_GENERIC_ERROR, e.getMessage() );
         }

         Document     document   = parser.getDocument(); //Our Grammar

         TraverseSchema tst = null;
         try {
            if (DEBUG_SCHEMA_VALIDATION) {
               System.out.println("I am geting the Schema Document");
            }

            Element root   = null;
            if (document != null) {
                root = document.getDocumentElement();// This is what we pass to TraverserSchema
            }
            if (root == null) {
               reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR, XMLMessages.SCHEMA_GENERIC_ERROR, "Can't get back Schema document's root element :" + loc);
            } else {
               if (uri == null || !uri.equals(root.getAttribute(SchemaSymbols.ATT_TARGETNAMESPACE)) ) {
                  reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR, XMLMessages.SCHEMA_GENERIC_ERROR, "Schema in " + loc + " has a different target namespace " +
                                            "from the one specified in the instance document :" + uri);
               }

               grammar = new SchemaGrammar();
               grammar.setGrammarDocument(document);
 
        // Since we've just constructed a schema grammar, we should make sure we know what we've done.
        fGrammarIsSchemaGrammar = true;
        fGrammarIsDTDGrammar = false;

                    //At this point we should expand the registry table.



              // pass parser's entity resolver (local Resolver), which also has reference to user's
              // entity resolver, and also can fall-back to entityhandler's expandSystemId()
               tst = new TraverseSchema( root, fStringPool, (SchemaGrammar)grammar, fGrammarResolver, fErrorReporter, source.getSystemId(), currentER);
               fGrammarResolver.putGrammar(root.getAttribute("targetNamespace"), grammar);
               fGrammar = (SchemaGrammar)grammar;
            }
         } catch (Exception e) {
            e.printStackTrace(System.err);
View Full Code Here

TOP

Related Classes of org.apache.xerces.validators.schema.TraverseSchema$Resolver

Copyright © 2018 www.massapicom. 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.