|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjd.xml.xslt.util.XsltSortable
jd.xml.xslt.template.TemplateRule
TemplateRule represents a xsl:template instruction.
Constructor Summary | |
TemplateRule(int importPrecedence,
double priority,
int serial,
Template template,
Variable[] params,
boolean hasLocalVariables,
Pattern pattern,
Pattern originalPattern,
String mode)
Create a TemplateRule with a match pattern. |
|
TemplateRule(int importPrecedence,
double priority,
int serial,
Template template,
Variable[] params,
boolean hasLocalVariables,
String name)
Create a named TemplateRule. |
|
TemplateRule(TemplateRule rule)
Create a TemplateRule by copying another rule. |
Method Summary | |
void |
applyTemplate(XsltContext context,
ResultBuilder resultBuilder,
Variable[] params,
XObject[] paramValues)
Instantiate the template of this template rule. |
String |
getMode()
Return the mode. |
String |
getName()
Return the name. |
Pattern |
getOriginalPattern()
Return the pattern, which was defined in the xsl:template instructions match attribute. |
Variable[] |
getParameters()
Return the parameters. |
Pattern |
getPattern()
Return the pattern which is used to test if a node matches the template. |
Template |
getTemplate()
Return the template content. |
boolean |
hasLocalVariables()
Return if the template contains local variable or parameter declarations. |
boolean |
match(String name)
Test if the name of this TemplateRule matches the given name. |
(package private) boolean |
match(XPathContext context)
Test if the pattern of this TemplateRule matches the context node. |
(package private) boolean |
match(XPathContext context,
String mode)
Test if the pattern of this TemplateRule matches the context node. |
static TemplateRule[] |
toSortedArray(Vector templateRules)
|
String |
toString()
Return a debug string representation. |
Methods inherited from class jd.xml.xslt.util.XsltSortable |
compareTo, getImportPrecedence, sort |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TemplateRule(int importPrecedence, double priority, int serial, Template template, Variable[] params, boolean hasLocalVariables, Pattern pattern, Pattern originalPattern, String mode)
importPrecedence
- the import precedencepriority
- the priorityserial
- the serial number of rule definitiontemplate
- a templateparams
- the template parameters. Either null or has positive lengthhasLocalVariables
- does the template contain local variable declarations?pattern
- the match patternmode
- the modepublic TemplateRule(int importPrecedence, double priority, int serial, Template template, Variable[] params, boolean hasLocalVariables, String name)
importPrecedence
- the import precedencepriority
- the priorityserial
- the serial number of rule definitiontemplate
- a templateparams
- the template parameters. Either null or has positive lengthhasLocalVariables
- does the template contain local variable declarations?name
- the namepublic TemplateRule(TemplateRule rule)
rule
- another ruleMethod Detail |
public static TemplateRule[] toSortedArray(Vector templateRules)
public Template getTemplate()
public Variable[] getParameters()
public String getName()
public String getMode()
public Pattern getPattern()
public Pattern getOriginalPattern()
public boolean hasLocalVariables()
public boolean match(String name)
boolean match(XPathContext context)
boolean match(XPathContext context, String mode)
public void applyTemplate(XsltContext context, ResultBuilder resultBuilder, Variable[] params, XObject[] paramValues)
context
- the transformation contextresultBuilder
- the result builderparams
- parameters supplied to the template via paramValues
- the values of the supplied parameters.public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |