All Packages Class Hierarchy This Package Previous Next Index
Class com.kvisco.xsl.TemplateRule
com.kvisco.xsl.XSLObject
|
+----com.kvisco.xsl.TemplateRule
- public class TemplateRule
- extends XSLObject
TemplateRule
Represents an XSL Template Rule
Section 2.5 of the W3C XSL Working Draft 1.0 (19980818)
- Author:
- Keith Visco
-
TemplateRule(XSLStylesheet)
- Creates a new TemplateRule.
By default the new rule will not match any elements.
-
calculatePriority(Node, ProcessorState)
-
-
copy()
-
-
getMatchExpr()
-
-
getMatchingExpr(Node, Node, ProcessorState)
-
-
getMode()
-
-
getName()
-
-
matches(Node, Node, ProcessorState)
- Determines if the given node is matched by this MatchExpr with
respect to the given context node.
-
setAttribute(String, String)
- Sets the attribute with the given name to the given value.
-
setMatchAttr(String)
- Sets the MatchExpr for this TemplateRule
-
setModeAttr(String)
-
-
setName(String)
- sets the name for this TemplateRule
-
setPriority(float)
- Sets the priority for this TemplateRule
TemplateRule
public TemplateRule(XSLStylesheet parentStylesheet)
- Creates a new TemplateRule.
By default the new rule will not match any elements.
copy
public XSLObject copy()
getMatchingExpr
public PathExpr getMatchingExpr(Node node,
Node context,
ProcessorState ps) throws InvalidExprException
getMatchExpr
public UnionExpr getMatchExpr()
- Returns:
- s the UnionExpr for this template
getMode
public String getMode()
getName
public String getName()
- Returns:
- s the name for this rule
calculatePriority
public float calculatePriority(Node node,
ProcessorState ps)
- Returns:
- the priority for this TemplateRule
matches
public boolean matches(Node node,
Node context,
ProcessorState ps) throws InvalidExprException
- Determines if the given node is matched by this MatchExpr with
respect to the given context node.
- 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
setAttribute
public void setAttribute(String name,
String value) throws XSLException
- Sets the attribute with the given name to the given value.
- Overrides:
- setAttribute in class XSLObject
setMatchAttr
public void setMatchAttr(String matchPattern)
- Sets the MatchExpr for this TemplateRule
- Parameters:
- matchPattern - the desired Match Pattern to use for this
template
setModeAttr
public void setModeAttr(String mode)
setName
public void setName(String theName)
- sets the name for this TemplateRule
- Parameters:
- theName - the desired name to use for this template
setPriority
public void setPriority(float priority)
- Sets the priority for this TemplateRule
- Parameters:
- priority - the desired priority of this rule.
0 by default
All Packages Class Hierarchy This Package Previous Next Index