Examples of XPathMatcher


Examples of org.apache.xerces.validators.schema.identity.XPathMatcher

         // call matchers and de-activate context
         if(fGrammarIsSchemaGrammar) {
            int oldCount = fMatcherStack.getMatcherCount();
            for (int i = oldCount - 1; i >= 0; i--) {
                XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
                if (DEBUG_IDENTITY_CONSTRAINTS) {
                    System.out.println("<IC>: "+matcher+"#endElement("+fStringPool.toString(fCurrentElement.rawname)+")");
                }
                matcher.endElement(fCurrentElement, fCurrentElementIndex, (SchemaGrammar)fGrammar);
            }
            if (DEBUG_IDENTITY_CONSTRAINTS) {
                System.out.println("<IC>: popping context - element: "+fStringPool.toString(fCurrentElement.rawname));
            }
            if (fMatcherStack.size() > 0) {
                fMatcherStack.popContext();
            }
            int newCount = fMatcherStack.getMatcherCount();
            // handle everything *but* keyref's.
            for (int i = oldCount - 1; i >= newCount; i--) {
                XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
                IdentityConstraint id;
                if((id = matcher.getIDConstraint()) != null  && id.getType() != IdentityConstraint.KEYREF) {
                    if (DEBUG_IDENTITY_CONSTRAINTS) {
                        System.out.println("<IC>: "+matcher+"#endDocumentFragment()");
                    }
                    matcher.endDocumentFragment();
                    fValueStoreCache.transplant(id);
                } else if (id == null)
                    matcher.endDocumentFragment();
            }
            // now handle keyref's/...
            for (int i = oldCount - 1; i >= newCount; i--) {
                XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
                IdentityConstraint id;
                if((id = matcher.getIDConstraint()) != null && id.getType() == IdentityConstraint.KEYREF) {
                    if (DEBUG_IDENTITY_CONSTRAINTS) {
                        System.out.println("<IC>: "+matcher+"#endDocumentFragment()");
                    }
                    ValueStoreBase values = fValueStoreCache.getValueStoreFor(id);
                    if(values != null) // nothing to do if nothing matched!
                        values.endDocumentFragment();
                    matcher.endDocumentFragment();
                }
            }
            fValueStoreCache.endElement();
        }
      }
View Full Code Here

Examples of org.apache.xerces.validators.schema.identity.XPathMatcher

      }

      // call all active identity constraints
      int matcherCount = fMatcherStack.getMatcherCount();
      for (int i = 0; i < matcherCount; i++) {
          XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
          if (DEBUG_IDENTITY_CONSTRAINTS) {
              String text = new String(fCharRefData, 0, count);
              System.out.println("<IC>: "+matcher.toString()+"#characters("+text+")");
          }
          matcher.characters(fCharRefData, 0, count);
      }

   } // callCharacters(int)
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.