Package org.apache.xerces.utils

Examples of org.apache.xerces.utils.NamespacesScope$NamespacesHandler


            reportGenericSchemaError( "no group named \"" + groupName
                                      + "\" was defined in schema : " + uriStr);
            return -1;
        }

        NamespacesScope saveNSMapping = fNamespacesScope;
        int saveTargetNSUri = fTargetNSURI;
        fTargetNSURI = fStringPool.addSymbol(aGrammar.getTargetNamespaceURI());
        fNamespacesScope = aGrammar.getNamespacesScope();

        boolean traverseElt = true;
View Full Code Here


         }
      }

      if (fNamespacesEnabled) {
         if (fNamespacesScope == null) {
            fNamespacesScope = new NamespacesScope(this);
            fNamespacesPrefix = fStringPool.addSymbol("xmlns");
            fNamespacesScope.setNamespaceForPrefix(fNamespacesPrefix, -1);
            int xmlSymbol = fStringPool.addSymbol("xml");
            int xmlNamespace = fStringPool.addSymbol("http://www.w3.org/XML/1998/namespace");
            fNamespacesScope.setNamespaceForPrefix(xmlSymbol, xmlNamespace);
View Full Code Here

         }
      }

      if (fNamespacesEnabled) {
         if (fNamespacesScope == null) {
            fNamespacesScope = new NamespacesScope(this);
            fNamespacesPrefix = fStringPool.addSymbol("xmlns");
            //fNamespacesScope.setNamespaceForPrefix(fNamespacesPrefix, StringPool.EMPTY_STRING);
    // xxxxx
            fNamespacesScope.setNamespaceForPrefix(fNamespacesPrefix, -1);
            int xmlSymbol = fStringPool.addSymbol("xml");
View Full Code Here

            // targetNamespace is right, so let's do the renaming...
            // and let's keep in mind that the targetNamespace of the redefined
            // elements is that of the redefined schema!
            fSchemaRootElement = root;
            fCurrentSchemaURL = location;
            fNamespacesScope = new NamespacesScope(this);
            if((redefinedTargetNSURIString.length() == 0) && (root.getAttributeNode("xmlns") == null)) {
                fNamespacesScope.setNamespaceForPrefix(StringPool.EMPTY_STRING, fTargetNSURI);
            } else {
            }
            // get default form xmlns bindings et al.
View Full Code Here

        int scope = GeneralAttrCheck.ELE_CONTEXT_GLOBAL;
        Hashtable attrValues = generalCheck(redefineDecl, scope);

        // initialize storage areas...
        fRedefineAttributeGroupMap = new Hashtable();
        NamespacesScope saveNSScope = (NamespacesScope)fNamespacesScope.clone();

        // only case in which need to save contents is when fSchemaInfoListRoot is null; otherwise we'll have
        // done this already one way or another.
        if (fSchemaInfoListRoot == null) {
            fSchemaInfoListRoot = new SchemaInfo(fElementDefaultQualified, fAttributeDefaultQualified,
                    fBlockDefault, fFinalDefault,
                    fCurrentSchemaURL, fSchemaRootElement,
                    fNamespacesScope, null, null);
            openRedefinedSchema(redefineDecl, fSchemaInfoListRoot);
            if(!fRedefineSucceeded)
                return;
            fCurrentSchemaInfo = fSchemaInfoListRoot.getNext();
            fNamespacesScope = (NamespacesScope)saveNSScope.clone();
        renameRedefinedComponents(redefineDecl,fSchemaInfoListRoot.getNext().getRoot(), fSchemaInfoListRoot.getNext());
        } else {
            // may have a chain here; need to be wary!
            SchemaInfo curr = fSchemaInfoListRoot;
            for(; curr.getNext() != null; curr = curr.getNext());
            fCurrentSchemaInfo = curr;
            fCurrentSchemaInfo.restore();
            openRedefinedSchema(redefineDecl, fCurrentSchemaInfo);
            if(!fRedefineSucceeded)
                return;
            fNamespacesScope = (NamespacesScope)saveNSScope.clone();
        renameRedefinedComponents(redefineDecl,fCurrentSchemaInfo.getRoot(), fCurrentSchemaInfo);
        }
        // Now we have to march through our nicely-renamed schemas from the
        // bottom up.  When we do these traversals other <redefine>'s may
        // perhaps be encountered; we leave recursion to sort this out.

        fCurrentSchemaInfo.restore();
        traverseIncludedSchema(fSchemaRootElement);
        fNamespacesScope = (NamespacesScope)saveNSScope.clone();
        // and last but not least:  traverse our own <redefine>--the one all
        // this labour has been expended upon.
        for (Element child = XUtil.getFirstChildElement(redefineDecl); child != null;
               child = XUtil.getNextSiblingElement(child)) {
             String name = child.getLocalName();
View Full Code Here

                else { // found it!
                  foundIt = true;
                            openRedefinedSchema(child, currSchema);
                            if(!fRedefineSucceeded)
                                return;
                            NamespacesScope saveNSS = (NamespacesScope)fNamespacesScope.clone();
                            currSchema.restore();
                            if (validateRedefineNameChange(eltLocalname, oldName, newName+redefIdentifier, redefChild) &&
                                    (currSchema.getNext() != null)) {
                                currSchema.getNext().restore();
                              fixRedefinedSchema(eltLocalname, oldName, newName+redefIdentifier, fSchemaRootElement, currSchema.getNext());
View Full Code Here

            if ( child.getLocalName().equals(SchemaSymbols.ELT_ATTRIBUTE) ){
                traverseAttributeDecl(child, typeInfo, false);
            }
            else if ( child.getLocalName().equals(SchemaSymbols.ELT_ATTRIBUTEGROUP) ) {
                NamespacesScope currScope = (NamespacesScope)fNamespacesScope.clone();
          //  if(typeInfo != null)
           // only do this if we're traversing because we were ref'd here; when we come
          // upon this decl by itself we're just validating.
                  traverseAttributeGroupDecl(child, typeInfo,anyAttDecls);
                fNamespacesScope = currScope;
View Full Code Here

            reportGenericSchemaError( "no attribute group named \"" + attGrpName
                                      + "\" was defined in schema : " + uriStr);
            return -1;
        }

        NamespacesScope saveNSMapping = fNamespacesScope;
        int saveTargetNSUri = fTargetNSURI;
        fTargetNSURI = fStringPool.addSymbol(aGrammar.getTargetNamespaceURI());
        fNamespacesScope = aGrammar.getNamespacesScope();

        // attribute type
View Full Code Here

            reportGenericSchemaError( "no group named \"" + groupName
                                      + "\" was defined in schema : " + uriStr);
            return null;
        }

        NamespacesScope saveNSMapping = fNamespacesScope;
        int saveTargetNSUri = fTargetNSURI;
        fTargetNSURI = fStringPool.addSymbol(aGrammar.getTargetNamespaceURI());
        fNamespacesScope = aGrammar.getNamespacesScope();

  Element child = checkContent( groupDecl, XUtil.getFirstChildElement(groupDecl), true );
View Full Code Here

            // targetNamespace is right, so let's do the renaming...
            // and let's keep in mind that the targetNamespace of the redefined
            // elements is that of the redefined schema!
            fSchemaRootElement = root;
            fCurrentSchemaURL = location;
            fNamespacesScope = new NamespacesScope(this);
            if((redefinedTargetNSURIString.length() == 0) && (root.getAttributeNode("xmlns") == null)) {
                fNamespacesScope.setNamespaceForPrefix(StringPool.EMPTY_STRING, fTargetNSURI);
            } else {
            }
            // get default form xmlns bindings et al.
View Full Code Here

TOP

Related Classes of org.apache.xerces.utils.NamespacesScope$NamespacesHandler

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.