Package net.sf.saxon.pattern

Examples of net.sf.saxon.pattern.NodeTest


    MatchContext mc = matchContext.getLast();
    MatchContext newContext = new MatchContext();
    if (mc.elementArcs != null) {
      for (PathMapArc arc : mc.elementArcs) {
        AxisExpression ae = arc.getStep();
        NodeTest test = ae.getNodeTest();
        if (test == null || test.matches(Type.ELEMENT, nameCode, typeCode)) {
          newContext.bulidContext(arc.getTarget());
          newContext.matchedElement = true;
        }
        if (ae.getAxis() == Axis.DESCENDANT || ae.getAxis() == Axis.DESCENDANT_OR_SELF) {
          newContext.processArc(arc);
View Full Code Here


      return;
    }
    if (mc.attributeArcs != null) {
      for (PathMapArc arc : mc.attributeArcs) {
        AxisExpression ae = arc.getStep();
        NodeTest test = ae.getNodeTest();
        if (test == null || test.matches(Type.ATTRIBUTE, nameCode, typeCode)) {
          super.attribute(nameCode, typeCode, value, locationId, properties);
          return;
        }
      }
    }
View Full Code Here

      }
    }

    void processArc(PathMapArc arc) {
      AxisExpression ae = arc.getStep();
      NodeTest test = ae.getNodeTest();
      if (test == null) {
        addAnyNodeArc(arc);
      } else {
        switch (test.getPrimitiveType()) {
        case Type.TEXT:
          matchesText = true;
        case Type.NODE:
          addAnyNodeArc(arc);
          break;
View Full Code Here

        while (step != null) {
            if (step instanceof AxisExpression) {
                AxisExpression axisExpr = (AxisExpression) step;

                NodeTest nodeTest = axisExpr.getNodeTest();

                if (!(nodeTest instanceof NameTest)) {
                    break;
                }
View Full Code Here

            while (!at.isBuiltInType()) {
                at = (AtomicType)at.getBaseType();
            }
            return SaxonXQDataFactory.mapSaxonTypeToXQJ(at.getFingerprint());
        } else if (itemType instanceof NodeTest) {
            NodeTest it = (NodeTest)itemType;
            if (it instanceof DocumentNodeTest) {
                it = ((DocumentNodeTest)it).getElementTest();
            }
            if ((it.getNodeKindMask() &
                    (1<<Type.DOCUMENT | 1<<Type.TEXT | 1<<Type.COMMENT | 1<<Type.PROCESSING_INSTRUCTION | 1<<Type.NAMESPACE)) != 0) {
                throw new XQException("Wrong node kind for getBaseType()");
            }
            SchemaType contentType = it.getContentType();
            if (contentType.isAtomicType()) {
                AtomicType at = (AtomicType)contentType;
                while (!at.isBuiltInType()) {
                    at = (AtomicType)at.getBaseType();
                }
View Full Code Here

        if (mid.getAxis() != Axis.DESCENDANT_OR_SELF) {
            return null;
        }


        NodeTest test = mid.getNodeTest();
        if (!(test == null || test instanceof AnyNodeTest)) {
            return null;
        }

        Expression underlyingStep = step;
View Full Code Here

        if (mid.getAxis() != Axis.DESCENDANT_OR_SELF) {
            return null;
        }


        NodeTest test = mid.getNodeTest();
        if (!(test == null || test instanceof AnyNodeTest)) {
            return null;
        }

        Expression underlyingStep = step;
View Full Code Here

        while (step != null) {
            if (step instanceof AxisExpression) {
                AxisExpression axisExpr = (AxisExpression) step;

                NodeTest nodeTest = axisExpr.getNodeTest();

                if (!(nodeTest instanceof NameTest)) {
                    break;
                }
View Full Code Here

        if (mid.getAxis() != Axis.DESCENDANT_OR_SELF) {
            return null;
        }


        NodeTest test = mid.getNodeTest();
        if (!(test == null || test instanceof AnyNodeTest)) {
            return null;
        }

        Expression underlyingStep = step;
View Full Code Here

        while (step != null) {
            if (step instanceof AxisExpression) {
                AxisExpression axisExpr = (AxisExpression) step;

                NodeTest nodeTest = axisExpr.getNodeTest();

                if (!(nodeTest instanceof NameTest)) {
                    break;
                }
View Full Code Here

TOP

Related Classes of net.sf.saxon.pattern.NodeTest

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.