Package org.apache.xerces.impl.xs.identity

Examples of org.apache.xerces.impl.xs.identity.XPathMatcher


     * @param field The field to activate.
     */
    public XPathMatcher activateField(Field field, int initialDepth) {
        ValueStore valueStore = fValueStoreCache.getValueStoreFor(field.getIdentityConstraint(), initialDepth);
        field.setMayMatch(true);
        XPathMatcher matcher = field.createMatcher(valueStore);
        fMatcherStack.addMatcher(matcher);
        matcher.startDocumentFragment(fSymbolTable);
        return matcher;
    } // activateField(Field):XPathMatcher
View Full Code Here


    private void activateSelectorFor(IdentityConstraint ic) throws XNIException {
        Selector selector = ic.getSelector();
        FieldActivator activator = this;
        if (selector == null)
            return;
        XPathMatcher matcher = selector.createMatcher(activator, fElementDepth);
        fMatcherStack.addMatcher(matcher);
        matcher.startDocumentFragment(fSymbolTable);
    }
View Full Code Here

        }

        // call all active identity constraints
        int count = fMatcherStack.getMatcherCount();
        for (int i = 0; i < count; i++) {
            XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
            matcher.startElement(element, attributes, fCurrentElemDecl);
        }

        if (fAugPSVI) {
            augs = getEmptyAugs(augs);
View Full Code Here

        // 6 The element information item must be valid with respect to each of the {identity-constraint definitions} as per Identity-constraint Satisfied (3.11.4).

        // call matchers and de-activate context
        int oldCount = fMatcherStack.getMatcherCount();
        for (int i = oldCount - 1; i >= 0; i--) {
            XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
            matcher.endElement(element, fCurrentElemDecl,
                               fDefaultValue == null ?
                               fValidatedInfo.normalizedValue :
                               fCurrentElemDecl.fDefault.normalizedValue);
        }
        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);
            if(matcher instanceof Selector.Matcher) {
                Selector.Matcher selMatcher = (Selector.Matcher)matcher;
                IdentityConstraint id;
                if ((id = selMatcher.getIdentityConstraint()) != null && id.getCategory() != IdentityConstraint.IC_KEYREF) {
                    fValueStoreCache.transplant(id, selMatcher.getInitialDepth());
                }
            }
        }
        // now handle keyref's/...
        for (int i = oldCount - 1; i >= newCount; i--) {
            XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
            if(matcher instanceof Selector.Matcher) {
                Selector.Matcher selMatcher = (Selector.Matcher)matcher;
                IdentityConstraint id;
                if ((id = selMatcher.getIdentityConstraint()) != null && id.getCategory() == IdentityConstraint.IC_KEYREF) {
                    ValueStoreBase values = fValueStoreCache.getValueStoreFor(id, selMatcher.getInitialDepth());
View Full Code Here

   */
  public XPathMatcher activateField(Field field, int initialDepth) {
    ValueStore valueStore =
      fValueStoreCache.getValueStoreFor(field.getIdentityConstraint(), initialDepth);
    field.setMayMatch(true);
    XPathMatcher matcher = field.createMatcher(valueStore);
    fMatcherStack.addMatcher(matcher);
    matcher.startDocumentFragment();
    return matcher;
  } // activateField(Field):XPathMatcher
View Full Code Here

  private void activateSelectorFor(IdentityConstraint ic) {
    Selector selector = ic.getSelector();
    FieldActivator activator = this;
    if (selector == null)
      return;
    XPathMatcher matcher = selector.createMatcher(activator, fElementDepth);
    fMatcherStack.addMatcher(matcher);
    matcher.startDocumentFragment();
  }
View Full Code Here

    }

    // call all active identity constraints
    int count = fMatcherStack.getMatcherCount();
    for (int i = 0; i < count; i++) {
      XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
      matcher.startElement( element, attributes);
    }

    if (fAugPSVI) {
      augs = getEmptyAugs(augs);
View Full Code Here

    // 6 The element information item must be valid with respect to each of the {identity-constraint definitions} as per Identity-constraint Satisfied (3.11.4).

    // call matchers and de-activate context
    int oldCount = fMatcherStack.getMatcherCount();
    for (int i = oldCount - 1; i >= 0; i--) {
      XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
      if (fCurrentElemDecl == null)
        matcher.endElement(element, null, false, fValidatedInfo.actualValue);

      else
        matcher.endElement(
          element,
          fCurrentElemDecl.fType,
          fCurrentElemDecl.getNillable(),
          fDefaultValue == null
            ? fValidatedInfo.actualValue
            : fCurrentElemDecl.fDefault.actualValue);
    }

    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);
      if (matcher instanceof Selector.Matcher) {
        Selector.Matcher selMatcher = (Selector.Matcher) matcher;
        IdentityConstraint id;
        if ((id = selMatcher.getIdentityConstraint()) != null
          && id.getCategory() != IdentityConstraint.IC_KEYREF) {
          fValueStoreCache.transplant(id, selMatcher.getInitialDepth());
        }
      }
    }

    // now handle keyref's/...
    for (int i = oldCount - 1; i >= newCount; i--) {
      XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
      if (matcher instanceof Selector.Matcher) {
        Selector.Matcher selMatcher = (Selector.Matcher) matcher;
        IdentityConstraint id;
        if ((id = selMatcher.getIdentityConstraint()) != null
          && id.getCategory() == IdentityConstraint.IC_KEYREF) {
View Full Code Here

     * @param field The field to activate.
     */
    public XPathMatcher activateField(Field field, int initialDepth) {
        ValueStore valueStore =
            fValueStoreCache.getValueStoreFor(field.getIdentityConstraint(), initialDepth);
        XPathMatcher matcher = field.createMatcher(valueStore);
        fMatcherStack.addMatcher(matcher);
        matcher.startDocumentFragment();
        return matcher;
    } // activateField(Field):XPathMatcher
View Full Code Here

    private void activateSelectorFor(IdentityConstraint ic) {
        Selector selector = ic.getSelector();
        FieldActivator activator = this;
        if (selector == null)
            return;
        XPathMatcher matcher = selector.createMatcher(activator, fElementDepth);
        fMatcherStack.addMatcher(matcher);
        matcher.startDocumentFragment();
    }
View Full Code Here

TOP

Related Classes of org.apache.xerces.impl.xs.identity.XPathMatcher

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.