Examples of AxisExpression


Examples of client.net.sf.saxon.ce.expr.AxisExpression

                compileError("Invalid element within xsl:apply-templates", "XTSE0010");
            }
        }

        if (select==null) {
            select = new AxisExpression(Axis.CHILD, null);
            select.setSourceLocator(this);
        }

        select = typeCheck(select);
        try {
View Full Code Here

Examples of net.sf.saxon.expr.AxisExpression

      throws XPathException {
    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);
        }
      }
    }
    matchContext.add(newContext);
View Full Code Here

Examples of net.sf.saxon.expr.AxisExpression

    if (!mc.matchedElement) {
      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

Examples of net.sf.saxon.expr.AxisExpression

          processArc(arc);
      }
    }

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

Examples of net.sf.saxon.expr.AxisExpression

          return;
        }
      } else {
        for (Iterator iter = finalNodes.iterator(); iter.hasNext(); ) {
                  PathMapNode subNode = (PathMapNode)iter.next();
                  subNode.createArc(new AxisExpression(Axis.DESCENDANT_OR_SELF, AnyNodeTest.getInstance()));
              }
      }
    }
    if (parentRoot.hasUnknownDependencies()) {
      if (record.recordDebug()) {
View Full Code Here

Examples of net.sf.saxon.expr.AxisExpression

    return newMap.reduceToDownwardsAxes(newRoot);
  }

  private void addReturnedArcs(XMLColumn xmlColumn, PathMapNode subNode) {
    if (xmlColumn.getSymbol().getType() == DataTypeManager.DefaultDataClasses.XML) {
      subNode.createArc(new AxisExpression(Axis.DESCENDANT_OR_SELF, AnyNodeTest.getInstance()));
    } else {
      //this may not always be needed, but it doesn't harm anything
      subNode.createArc(new AxisExpression(Axis.CHILD, NodeKindTest.TEXT));
      subNode.setAtomized();
    }
  }
View Full Code Here

Examples of net.sf.saxon.expr.AxisExpression

        PathExpression pathExpr = (PathExpression) subExpr;
        Expression step = pathExpr.getFirstStep();

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

                NodeTest nodeTest = axisExpr.getNodeTest();

                if (!(nodeTest instanceof NameTest)) {
                    break;
                }

                NameTest nameTest = (NameTest) nodeTest;

                QName childName = getQualifiedName(nameTest.getFingerprint(),
                        namePool, contextUris);

                if (Axis.CHILD == axisExpr.getAxis()) {
                    if (NodeKindTest.ELEMENT.getNodeKindMask() != nameTest.getNodeKindMask()) {
                        break;
                    }

                    NodeList children = ((Element) contextNode).getElementsByTagNameNS(childName.getNamespaceURI(),
                            childName.getLocalPart());
                    if ((children == null) || (children.getLength() == 0)) {
                        Node child = document.createElementNS(childName.getNamespaceURI(),
                                DOMUtils.getQualifiedName(childName));
                        contextNode.appendChild(child);
                        contextNode = child;
                    } else if (children.getLength() == 1) {
                        contextNode = children.item(0);
                    } else {
                        break;
                    }
                } else if (Axis.ATTRIBUTE == axisExpr.getAxis()) {
                    if (NodeKindTest.ATTRIBUTE.getNodeKindMask() != nameTest.getNodeKindMask()) {
                        break;
                    }

                    Attr attribute = ((Element) contextNode).getAttributeNodeNS(childName.getNamespaceURI(), childName.getLocalPart());
View Full Code Here

Examples of net.sf.saxon.expr.AxisExpression

        PathExpression pathExpr = (PathExpression) subExpr;
        Expression step = pathExpr.getFirstStep();

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

                NodeTest nodeTest = axisExpr.getNodeTest();

                if (!(nodeTest instanceof NameTest)) {
                    break;
                }

                NameTest nameTest = (NameTest) nodeTest;

                QName childName = getQualifiedName(nameTest.getFingerprint(),
                        namePool, contextUris);
               
                if (Axis.CHILD == axisExpr.getAxis()) {
                    if (NodeKindTest.ELEMENT.getNodeKindMask() != nameTest.getNodeKindMask()) {
                        break;
                    }
                 
                    NodeList children = ((Element) contextNode).getElementsByTagNameNS(childName.getNamespaceURI(),
                            childName.getLocalPart());
                    if ((children == null) || (children.getLength() == 0)) {
                        Node child = document.createElementNS(childName.getNamespaceURI(),
                                DOMUtils.getQualifiedName(childName));
                        contextNode.appendChild(child);
                        contextNode = child;
                    } else if (children.getLength() == 1) {
                        contextNode = children.item(0);
                    } else {
                        break;
                    }
                } else if (Axis.ATTRIBUTE == axisExpr.getAxis()) {
                    if (NodeKindTest.ATTRIBUTE.getNodeKindMask() != nameTest.getNodeKindMask()) {
                        break;
                    }
                   
                    Attr attribute = ((Element) contextNode).getAttributeNodeNS(childName.getNamespaceURI(), childName.getLocalPart());
View Full Code Here

Examples of net.sf.saxon.expr.AxisExpression

        PathExpression pathExpr = (PathExpression) subExpr;
        Expression step = pathExpr.getFirstStep();

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

                NodeTest nodeTest = axisExpr.getNodeTest();

                if (!(nodeTest instanceof NameTest)) {
                    break;
                }

                NameTest nameTest = (NameTest) nodeTest;

                QName childName = getQualifiedName(nameTest.getFingerprint(),
                        namePool, contextUris);

                if (Axis.CHILD == axisExpr.getAxis()) {
                    if (NodeKindTest.ELEMENT.getNodeKindMask() != nameTest.getNodeKindMask()) {
                        break;
                    }

                    NodeList children = ((Element) contextNode).getElementsByTagNameNS(childName.getNamespaceURI(),
                            childName.getLocalPart());
                    if ((children == null) || (children.getLength() == 0)) {
                        Node child = document.createElementNS(childName.getNamespaceURI(),
                                DOMUtils.getQualifiedName(childName));
                        contextNode.appendChild(child);
                        contextNode = child;
                    } else if (children.getLength() == 1) {
                        contextNode = children.item(0);
                    } else {
                        break;
                    }
                } else if (Axis.ATTRIBUTE == axisExpr.getAxis()) {
                    if (NodeKindTest.ATTRIBUTE.getNodeKindMask() != nameTest.getNodeKindMask()) {
                        break;
                    }

                    Attr attribute = ((Element) contextNode).getAttributeNodeNS(childName.getNamespaceURI(), childName.getLocalPart());
View Full Code Here

Examples of net.sf.saxon.expr.AxisExpression

        PathExpression pathExpr = (PathExpression) subExpr;
        Expression step = pathExpr.getFirstStep();

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

                NodeTest nodeTest = axisExpr.getNodeTest();

                if (!(nodeTest instanceof NameTest)) {
                    break;
                }

                NameTest nameTest = (NameTest) nodeTest;

                QName childName = getQualifiedName(nameTest.getFingerprint(),
                        namePool, contextUris);
               
                if (Axis.CHILD == axisExpr.getAxis()) {
                    if (NodeKindTest.ELEMENT.getNodeKindMask() != nameTest.getNodeKindMask()) {
                        break;
                    }
                 
                    NodeList children = ((Element) contextNode).getElementsByTagNameNS(childName.getNamespaceURI(),
                            childName.getLocalPart());
                    if ((children == null) || (children.getLength() == 0)) {
                        Node child = document.createElementNS(childName.getNamespaceURI(),
                                DOMUtils.getQualifiedName(childName));
                        contextNode.appendChild(child);
                        contextNode = child;
                    } else if (children.getLength() == 1) {
                        contextNode = children.item(0);
                    } else {
                        break;
                    }
                } else if (Axis.ATTRIBUTE == axisExpr.getAxis()) {
                    if (NodeKindTest.ATTRIBUTE.getNodeKindMask() != nameTest.getNodeKindMask()) {
                        break;
                    }
                   
                    Attr attribute = ((Element) contextNode).getAttributeNodeNS(childName.getNamespaceURI(), childName.getLocalPart());
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.