org.exolab.adaptx.xslt
public final class TemplateRule extends XSLObject
Version: $Revision: 3633 $ $Date: 2003-03-01 02:38:44 -0500 (Sat, 01 Mar 2003) $
Constructor Summary | |
---|---|
TemplateRule()
Creates a new TemplateRule. By default the new rule will not match any elements. |
Method Summary | |
---|---|
float | calculatePriority(XPathNode node, XPathContext context)
Calculates the priority for this Template Rule. |
XSLObject | copy()
Creates a copy of this TemplateRule
|
LocationPathPattern | getMatchingPattern(XPathNode node, XPathContext context)
Returns the Pattern contained within this template rule that matched the given
node using the given context.
|
String | getMode()
Returns the mode attribute of this Template Rule
|
String | getName()
Returns the name for this Template Rule, or null if no name exists.
|
Pattern | getPattern()
Returns the match Pattern for this template
|
boolean | matches(XPathNode node, ProcessorState ps)
Determines if the given node is matched by this MatchExpr with
respect to the given context node.
|
void | setAttribute(String name, String value)
Sets the attribute with the given name to the given value.
|
void | setMatchAttr(String matchPattern)
Sets the MatchExpr for this TemplateRule |
void | setModeAttr(String mode) |
void | setName(String name)
Sets the name for this Template
|
void | setPriority(float priority)
Sets the priority for this TemplateRule |
Returns: the priority for this Template Rule
Returns: the new copy of this TemplateRule
Parameters: node the XPathNode to match against context the XPathContext to match against
Returns: the matching pattern, or null if no patterns matched the given node.
Returns: the value of the mode attribute.
UNKNOWN: the name for this rule, or null if no name exists.
Returns: the match Pattern for this template
Parameters: node the node to determine a match for context the Node which represents the current context ps the current ProcessorState
Returns: true if the given node is matched by this MatchExpr
Parameters: name the name of the attribute to set value the value to set the attribute to
Throws: XSLException if this XSLObject does not allow attributes with the given name, or if the attribute is read only
Parameters: matchPattern the desired Match Pattern to use for this template
Parameters: name the name to use for this template
Parameters: priority the desired priority of this rule. 0 by default