|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.adaptx.xslt.XSLObject
org.exolab.adaptx.xslt.TemplateRule
public final class TemplateRule
A class that Represents an XSLT Template Rule. Section 5 of the W3C XSLT 1.0 Recommendation (19991116).
Field Summary |
---|
Fields inherited from class org.exolab.adaptx.xslt.XSLObject |
---|
APPLY_IMPORTS, APPLY_TEMPLATES, ARG, ATTRIBUTE, ATTRIBUTE_SET, CALL_TEMPLATE, CDATA, CHOOSE, COMMENT, CONTENTS, COPY, COPY_OF, ELEMENT, ENTITY_REF, FOR_EACH, FUNCTIONS, ID, IF, IMPORT, INCLUDE, KEY, LITERAL, LOCALE, MESSAGE, NUMBER, OTHERWISE, OUTPUT, PARAM, PI, PRESERVE_SPACE, SCRIPT, SORT, STRIP_SPACE, STYLESHEET, TEMPLATE, TEXT, VALUE_OF, VARIABLE, WHEN, WITH_PARAM |
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. |
java.lang.String |
getMode()
Returns the mode attribute of this Template Rule |
java.lang.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(java.lang.String name,
java.lang.String value)
Sets the attribute with the given name to the given value. |
void |
setMatchAttr(java.lang.String matchPattern)
Sets the MatchExpr for this TemplateRule |
void |
setModeAttr(java.lang.String mode)
|
void |
setName(java.lang.String name)
Sets the name for this Template |
void |
setPriority(float priority)
Sets the priority for this TemplateRule |
Methods inherited from class org.exolab.adaptx.xslt.XSLObject |
---|
addNamespaceDecl, appendAction, appendText, appendText, getActions, getAttribute, getAttributes, getNamespace, getNearestAncestor, getNodeValue, getStylesheet, getText, getType, getTypeFromName, getTypeName, resolveNamespace, setAllowActions, setNamespace, setTypeName |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TemplateRule()
Method Detail |
---|
public float calculatePriority(XPathNode node, XPathContext context)
public XSLObject copy()
public LocationPathPattern getMatchingPattern(XPathNode node, XPathContext context) throws XPathException
node
- the XPathNode to match againstcontext
- the XPathContext to match against
XPathException
public java.lang.String getMode()
public java.lang.String getName()
public Pattern getPattern()
public boolean matches(XPathNode node, ProcessorState ps) throws XSLException
node
- the node to determine a match forcontext
- the Node which represents the current contextps
- the current ProcessorState
XSLException
public void setAttribute(java.lang.String name, java.lang.String value) throws XSLException
setAttribute
in class XSLObject
name
- the name of the attribute to setvalue
- the value to set the attribute to
XSLException
- if this XSLObject does not allow attributes
with the given name, or if the attribute is read onlypublic void setMatchAttr(java.lang.String matchPattern)
matchPattern
- the desired Match Pattern to use for this
templatepublic void setModeAttr(java.lang.String mode)
public void setName(java.lang.String name)
name
- the name to use for this templatepublic void setPriority(float priority)
priority
- the desired priority of this rule.
0 by default
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |