public class RedundentExprEliminator extends XSLTVisitor
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
static boolean |
DIAGNOSE_MULTISTEPLIST |
static boolean |
DIAGNOSE_NUM_PATHS_REDUCED |
Constructor and Description |
---|
RedundentExprEliminator()
Construct a RedundentExprEliminator.
|
Modifier and Type | Method and Description |
---|---|
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.
|
visitAVT, visitExtensionElement, visitLiteralResultElement, visitStylesheet, visitTopLevelVariableOrParamDecl, visitVariableOrParamDecl
visitBinaryOperation, visitFunction, visitMatchPattern, visitNumberLiteral, visitStep, visitStringLiteral, visitUnaryOperation, visitUnionPath, visitUnionPattern, visitVariableRef
public static final boolean DEBUG
public static final boolean DIAGNOSE_NUM_PATHS_REDUCED
public static final boolean DIAGNOSE_MULTISTEPLIST
public RedundentExprEliminator()
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.Copyright ? 2005 Apache XML Project. All Rights Reserved.