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

Constructor Index

 o TemplateRule(XSLStylesheet)
Creates a new TemplateRule.
By default the new rule will not match any elements.

Method Index

 o calculatePriority(Node, ProcessorState)
 o copy()
 o getMatchExpr()
 o getMatchingExpr(Node, Node, ProcessorState)
 o getMode()
 o getName()
 o matches(Node, Node, ProcessorState)
Determines if the given node is matched by this MatchExpr with respect to the given context node.
 o setAttribute(String, String)
Sets the attribute with the given name to the given value.
 o setMatchAttr(String)
Sets the MatchExpr for this TemplateRule
 o setModeAttr(String)
 o setName(String)
sets the name for this TemplateRule
 o setPriority(float)
Sets the priority for this TemplateRule

Constructors

 o TemplateRule
 public TemplateRule(XSLStylesheet parentStylesheet)
Creates a new TemplateRule.
By default the new rule will not match any elements.

Methods

 o copy
 public XSLObject copy()
 o getMatchingExpr
 public PathExpr getMatchingExpr(Node node,
                                 Node context,
                                 ProcessorState ps) throws InvalidExprException
 o getMatchExpr
 public UnionExpr getMatchExpr()
Returns:
s the UnionExpr for this template
 o getMode
 public String getMode()
 o getName
 public String getName()
Returns:
s the name for this rule
 o calculatePriority
 public float calculatePriority(Node node,
                                ProcessorState ps)
Returns:
the priority for this TemplateRule
 o 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
 o 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
 o setMatchAttr
 public void setMatchAttr(String matchPattern)
Sets the MatchExpr for this TemplateRule

Parameters:
matchPattern - the desired Match Pattern to use for this template
 o setModeAttr
 public void setModeAttr(String mode)
 o setName
 public void setName(String theName)
sets the name for this TemplateRule

Parameters:
theName - the desired name to use for this template
 o 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