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

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


        }

        // 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, fValidatedInfo.actualValueType, fValidatedInfo.itemValueTypes);

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

        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

   */
  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,
          fCurrentType,
          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

  public XPathMatcher activateField(Field paramField, int paramInt)
  {
    ValueStoreBase localValueStoreBase = this.fValueStoreCache.getValueStoreFor(paramField.getIdentityConstraint(), paramInt);
    setMayMatch(paramField, Boolean.TRUE);
    XPathMatcher localXPathMatcher = paramField.createMatcher(this, localValueStoreBase);
    this.fMatcherStack.addMatcher(localXPathMatcher);
    localXPathMatcher.startDocumentFragment();
    return localXPathMatcher;
  }
View Full Code Here

  {
    Selector localSelector = paramIdentityConstraint.getSelector();
    XMLSchemaValidator localXMLSchemaValidator = this;
    if (localSelector == null)
      return;
    XPathMatcher localXPathMatcher = localSelector.createMatcher(localXMLSchemaValidator, this.fElementDepth);
    this.fMatcherStack.addMatcher(localXPathMatcher);
    localXPathMatcher.startDocumentFragment();
  }
View Full Code Here

    if (localXSAttributeGroupDecl != null)
      addDefaultAttributes(paramQName, paramXMLAttributes, localXSAttributeGroupDecl);
    int i = this.fMatcherStack.getMatcherCount();
    for (int j = 0; j < i; j++)
    {
      XPathMatcher localXPathMatcher = this.fMatcherStack.getMatcherAt(j);
      localXPathMatcher.startElement(paramQName, paramXMLAttributes);
    }
    if (this.fAugPSVI)
    {
      paramAugmentations = getEmptyAugs(paramAugmentations);
      this.fCurrentPSVI.fValidationContext = this.fValidationRoot;
View Full Code Here

    if (this.fIDCChecking)
    {
      int i = this.fMatcherStack.getMatcherCount();
      for (int j = i - 1; j >= 0; j--)
      {
        XPathMatcher localXPathMatcher1 = this.fMatcherStack.getMatcherAt(j);
        if (this.fCurrentElemDecl == null)
          localXPathMatcher1.endElement(paramQName, this.fCurrentType, false, this.fValidatedInfo.actualValue, this.fValidatedInfo.actualValueType, this.fValidatedInfo.itemValueTypes);
        else
          localXPathMatcher1.endElement(paramQName, this.fCurrentType, this.fCurrentElemDecl.getNillable(), this.fDefaultValue == null ? this.fValidatedInfo.actualValue : this.fCurrentElemDecl.fDefault.actualValue, this.fDefaultValue == null ? this.fValidatedInfo.actualValueType : this.fCurrentElemDecl.fDefault.actualValueType, this.fDefaultValue == null ? this.fValidatedInfo.itemValueTypes : this.fCurrentElemDecl.fDefault.itemValueTypes);
      }
      if (this.fMatcherStack.size() > 0)
        this.fMatcherStack.popContext();
      int k = this.fMatcherStack.getMatcherCount();
      Object localObject1;
      Object localObject2;
      for (int m = i - 1; m >= k; m--)
      {
        XPathMatcher localXPathMatcher2 = this.fMatcherStack.getMatcherAt(m);
        if (!(localXPathMatcher2 instanceof Selector.Matcher))
          continue;
        localObject1 = (Selector.Matcher)localXPathMatcher2;
        if (((localObject2 = ((Selector.Matcher)localObject1).getIdentityConstraint()) == null) || (((IdentityConstraint)localObject2).getCategory() == 2))
          continue;
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.