You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2001/05/23 20:17:03 UTC
cvs commit: xml-xalan/java/src/org/apache/xpath/patterns ContextMatchStepPattern.java StepPattern.java
sboag 01/05/23 11:17:00
Modified: java/src/org/apache/xpath Tag: DTM_EXP XPathContext.java
java/src/org/apache/xpath/axes Tag: DTM_EXP
WalkerFactory.java
java/src/org/apache/xpath/patterns Tag: DTM_EXP
StepPattern.java
Added: java/src/org/apache/xpath/axes Tag: DTM_EXP
MatchPatternIterator.java
java/src/org/apache/xpath/patterns Tag: DTM_EXP
ContextMatchStepPattern.java
Log:
Added some missing files. Sorry. And some progress on match iterators,
but still ongoing.
Revision Changes Path
No revision
No revision
1.20.2.9 +31 -5 xml-xalan/java/src/org/apache/xpath/XPathContext.java
Index: XPathContext.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/XPathContext.java,v
retrieving revision 1.20.2.8
retrieving revision 1.20.2.9
diff -u -r1.20.2.8 -r1.20.2.9
--- XPathContext.java 2001/05/22 05:48:46 1.20.2.8
+++ XPathContext.java 2001/05/23 18:16:25 1.20.2.9
@@ -721,9 +721,7 @@
}
/**
- * Set the current context node.
- *
- * @param n the <a href="http://www.w3.org/TR/xslt#dt-current-node">current node</a>.
+ * Set the current predicate root.
*/
public final void pushPredicateRoot(int n)
{
@@ -731,7 +729,7 @@
}
/**
- * Pop the current context node.
+ * Pop the current predicate root.
*/
public final void popPredicateRoot()
{
@@ -739,12 +737,40 @@
}
/**
- * Pop the current context node.
+ * Get the current predicate root.
*/
public final int getPredicateRoot()
{
return m_predicateRoots.peepOrNull();
}
+
+ /**
+ * Set the current location path iterator root.
+ */
+ public final void pushIteratorRoot(int n)
+ {
+ m_iteratorRoots.push(n);
+ }
+
+ /**
+ * Pop the current location path iterator root.
+ */
+ public final void popIteratorRoot()
+ {
+ m_iteratorRoots.popQuick();
+ }
+
+ /**
+ * Get the current location path iterator root.
+ */
+ public final int getIteratorRoot()
+ {
+ return m_iteratorRoots.peepOrNull();
+ }
+
+ /** A stack of the current sub-expression nodes. */
+ private NodeVector m_iteratorRoots = new NodeVector();
+
/** A stack of the current sub-expression nodes. */
private NodeVector m_predicateRoots = new NodeVector();
No revision
No revision
1.13.2.3 +5 -5 xml-xalan/java/src/org/apache/xpath/axes/WalkerFactory.java
Index: WalkerFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/axes/WalkerFactory.java,v
retrieving revision 1.13.2.2
retrieving revision 1.13.2.3
diff -u -r1.13.2.2 -r1.13.2.3
--- WalkerFactory.java 2001/05/23 02:57:42 1.13.2.2
+++ WalkerFactory.java 2001/05/23 18:16:40 1.13.2.3
@@ -60,6 +60,7 @@
import org.apache.xpath.compiler.Compiler;
import org.apache.xpath.patterns.NodeTest;
import org.apache.xpath.patterns.StepPattern;
+import org.apache.xpath.patterns.ContextMatchStepPattern;
import org.apache.xpath.patterns.FunctionPattern;
import org.apache.xpath.Expression;
import org.apache.xpath.objects.XNumber;
@@ -502,8 +503,7 @@
if(axis < Axis.ALL)
{
- StepPattern selfPattern = new StepPattern(DTMFilter.SHOW_ALL,
- axis, paxis);
+ StepPattern selfPattern = new ContextMatchStepPattern(axis, paxis);
// We need to keep the new nodetest from affecting the score...
XNumber score = tail.getStaticScore();
tail.setRelativePathPattern(selfPattern);
@@ -653,13 +653,13 @@
}
if(null == ai)
{
- whatToShow = compiler.getWhatToShow(firstStepPos); // %REVIEW%
+ whatToShow = compiler.getWhatToShow(opPos); // %REVIEW%
ai = new StepPattern(whatToShow, compiler.getStepNS(opPos),
compiler.getStepLocalName(opPos),
axis, predicateAxis);
}
- if (false && DEBUG_PATTERN_CREATION)
+ if (DEBUG_PATTERN_CREATION)
{
System.out.print("new step: "+ ai + analysis);
System.out.print(", pattern: " + compiler.toString());
@@ -997,7 +997,7 @@
}
/** Set to true for diagnostics about walker creation */
- static final boolean DEBUG_PATTERN_CREATION = true;
+ static final boolean DEBUG_PATTERN_CREATION = false;
/** Set to true for diagnostics about walker creation */
static final boolean DEBUG_WALKER_CREATION = false;
No revision
No revision
1.1.2.1 +403 -0 xml-xalan/java/src/org/apache/xpath/axes/Attic/MatchPatternIterator.java
No revision
No revision
1.19.2.4 +0 -6 xml-xalan/java/src/org/apache/xpath/patterns/StepPattern.java
Index: StepPattern.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/patterns/StepPattern.java,v
retrieving revision 1.19.2.3
retrieving revision 1.19.2.4
diff -u -r1.19.2.3 -r1.19.2.4
--- StepPattern.java 2001/05/23 02:57:56 1.19.2.3
+++ StepPattern.java 2001/05/23 18:16:55 1.19.2.4
@@ -96,9 +96,6 @@
m_axis = axis;
m_axisForPredicate = axisForPredicate;
-
-// m_axis = Axis.PARENT;
-// m_axisForPredicate = Axis.CHILD;
}
/**
@@ -115,9 +112,6 @@
m_axis = axis;
m_axisForPredicate = axisForPredicate;
-
-// m_axis = Axis.PARENT;
-// m_axisForPredicate = Axis.CHILD;
}
/**
No revision
No revision
1.1.2.1 +104 -0 xml-xalan/java/src/org/apache/xpath/patterns/Attic/ContextMatchStepPattern.java
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org