case Axis.ANCESTOR: if (nodeKind==Type.DOCUMENT) return EmptyIterator.getInstance(); return new Navigator.AncestorEnumeration(this, false); return new Navigator.AncestorEnumeration(this, true);
switch (axisNumber) { case Axis.ANCESTOR: return new Navigator.AncestorEnumeration(this, false); case Axis.ANCESTOR_OR_SELF: return new Navigator.AncestorEnumeration(this, true); case Axis.ATTRIBUTE: return new AttributeAxisIterator(this);
ancestorEnum = new AncestorEnumeration(start, false); switch (start.getNodeKind()) { case Type.ELEMENT:
ancestorEnum = new AncestorEnumeration(start, false); switch (start.getNodeKind()) { case Type.ELEMENT:
/** * Create an iterator for the preceding or "preceding-or-ancestor" axis (the latter being * used internall to support xsl:number) * @param start the initial context node * @param includeAncestors true if ancestors of the initial context node are to be included * in the result */ public PrecedingEnumeration(NodeInfo start, boolean includeAncestors) { this.start = start; this.includeAncestors = includeAncestors; ancestorEnum = new AncestorEnumeration(start, false); switch (start.getNodeKind()) { case Type.ELEMENT: case Type.TEXT: case Type.COMMENT: case Type.PROCESSING_INSTRUCTION: // get preceding-sibling enumeration siblingEnum = start.iterateAxis(Axis.PRECEDING_SIBLING); break; default: siblingEnum = EmptyIterator.getInstance(); } }
/** * Create an iterator for the preceding or "preceding-or-ancestor" axis (the latter being * used internall to support xsl:number) * @param start the initial context node * @param includeAncestors true if ancestors of the initial context node are to be included * in the result */ public PrecedingEnumeration(NodeInfo start, boolean includeAncestors) { this.start = start; this.includeAncestors = includeAncestors; ancestorEnum = new AncestorEnumeration(start, false); switch (start.getNodeKind()) { case Type.ELEMENT: case Type.TEXT: case Type.COMMENT: case Type.PROCESSING_INSTRUCTION: // get preceding-sibling enumeration siblingEnum = start.iterateAxis(Axis.PRECEDING_SIBLING); break; default: siblingEnum = EmptyIterator.getInstance(); } }
public SequenceIterator getAnother() { return new AncestorEnumeration(start, includeSelf); }
public SequenceIterator getAnother() { return new AncestorEnumeration(start, includeSelf); }
switch (axisNumber) { case Axis.ANCESTOR: return new Navigator.AncestorEnumeration(this, false); case Axis.ANCESTOR_OR_SELF: return new Navigator.AncestorEnumeration(this, true); case Axis.ATTRIBUTE: return new AttributeAxisIterator(this);