|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.xpath.XPathVisitor
org.apache.xalan.templates.XSLTVisitor
org.apache.xalan.templates.RedundentExprEliminator
public class RedundentExprEliminator
This class eleminates redundent XPaths from a given subtree, and also collects all absolute paths within the subtree. First it must be called as a visitor to the subtree, and then eleminateRedundent must be called.
Field Summary | |
---|---|
static boolean |
DEBUG
|
static boolean |
DIAGNOSE_MULTISTEPLIST
|
static boolean |
DIAGNOSE_NUM_PATHS_REDUCED
|
Constructor Summary | |
---|---|
RedundentExprEliminator()
Construct a RedundentExprEliminator. |
Method Summary | |
---|---|
void |
eleminateRedundentGlobals(StylesheetRoot stylesheet)
Method to be called after the all global expressions within a stylesheet have been collected. |
void |
eleminateRedundentLocals(ElemTemplateElement psuedoVarRecipient)
Method to be called after the all expressions within an node context have been visited. |
boolean |
isAbsolute(LocPathIterator path)
Tell if the given LocPathIterator is relative to an absolute path, i.e. |
boolean |
visitInstruction(ElemTemplateElement elem)
Visit an XSLT instruction. |
boolean |
visitLocationPath(ExpressionOwner owner,
LocPathIterator path)
Visit a LocationPath. |
boolean |
visitPredicate(ExpressionOwner owner,
Expression pred)
Visit a predicate within a location path. |
boolean |
visitTopLevelInstruction(ElemTemplateElement elem)
Visit an XSLT top-level instruction. |
Methods inherited from class org.apache.xalan.templates.XSLTVisitor |
---|
visitAVT, visitExtensionElement, visitLiteralResultElement, visitStylesheet, visitTopLevelVariableOrParamDecl, visitVariableOrParamDecl |
Methods inherited from class org.apache.xpath.XPathVisitor |
---|
visitBinaryOperation, visitFunction, visitMatchPattern, visitNumberLiteral, visitStep, visitStringLiteral, visitUnaryOperation, visitUnionPath, visitUnionPattern, visitVariableRef |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean DEBUG
public static final boolean DIAGNOSE_NUM_PATHS_REDUCED
public static final boolean DIAGNOSE_MULTISTEPLIST
Constructor Detail |
---|
public RedundentExprEliminator()
Method Detail |
---|
public void eleminateRedundentLocals(ElemTemplateElement psuedoVarRecipient)
psuedoVarRecipient
- The recipient of the psuedo vars. The
variables will be inserted as first children of the element, before
any existing variables.public void eleminateRedundentGlobals(StylesheetRoot stylesheet)
public boolean isAbsolute(LocPathIterator path)
public boolean visitLocationPath(ExpressionOwner owner, LocPathIterator path)
visitLocationPath
in class XPathVisitor
owner
- The owner of the expression, to which the expression can
be reset if rewriting takes place.path
- The LocationPath object.
public boolean visitPredicate(ExpressionOwner owner, Expression pred)
visitPredicate
in class XPathVisitor
owner
- The owner of the expression, to which the expression can
be reset if rewriting takes place.pred
- The predicate object.
public boolean visitTopLevelInstruction(ElemTemplateElement elem)
visitTopLevelInstruction
in class XSLTVisitor
elem
- The xsl instruction element object.
public boolean visitInstruction(ElemTemplateElement elem)
visitInstruction
in class XSLTVisitor
elem
- The xsl instruction element object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |