org.apache.xalan.templates
public class RedundentExprEliminator extends XSLTVisitor
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.
in not dependent on the context.
|
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.
|
Parameters: psuedoVarRecipient The recipient of the psuedo vars. The variables will be inserted as first children of the element, before any existing variables.
Returns: true if the LocPathIterator is not dependent on the context node.
Parameters: elem The xsl instruction element object.
Returns: true if the sub expressions should be traversed.
Parameters: owner The owner of the expression, to which the expression can be reset if rewriting takes place. path The LocationPath object.
Returns: true if the sub expressions should be traversed.
Parameters: owner The owner of the expression, to which the expression can be reset if rewriting takes place. pred The predicate object.
Returns: true if the sub expressions should be traversed.
Parameters: elem The xsl instruction element object.
Returns: true if the sub expressions should be traversed.