switch (axisNumber) { case AxisInfo.ANCESTOR: try (AxisIterator iterator = new Navigator.AncestorEnumeration(this, false)) { result = iterator; try (AxisIterator iterator = new Navigator.AncestorEnumeration(this, true)) { result = iterator;
switch (axisNumber) { case AxisInfo.ANCESTOR: try (AxisIterator iterator = new Navigator.AncestorEnumeration(this, false)) { result = iterator; try (AxisIterator iterator = new Navigator.AncestorEnumeration(this, true)) { result = iterator;
new Navigator.AncestorEnumeration(this, false), nodeTest); new Navigator.AncestorEnumeration(this, true), nodeTest);
new Navigator.AncestorEnumeration(this, false), nodeTest); new Navigator.AncestorEnumeration(this, true), nodeTest);
new Navigator.AncestorEnumeration(this, false), nodeTest); case AxisInfo.ANCESTOR_OR_SELF: return new Navigator.AxisFilter( new Navigator.AncestorEnumeration(this, true), nodeTest); case AxisInfo.NAMESPACE: if (getNodeKind() != Type.ELEMENT) {
new Navigator.AncestorEnumeration(this, false), nodeTest); case AxisInfo.ANCESTOR_OR_SELF: return new Navigator.AxisFilter( new Navigator.AncestorEnumeration(this, true), nodeTest); case AxisInfo.NAMESPACE: if (getNodeKind() != Type.ELEMENT) {
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(/*@NotNull*/ 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(AxisInfo.PRECEDING_SIBLING); break; default: siblingEnum = EmptyIterator.OfNodes.THE_INSTANCE; } }
/** * 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(/*@NotNull*/ 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(AxisInfo.PRECEDING_SIBLING); break; default: siblingEnum = EmptyIterator.OfNodes.THE_INSTANCE; } }