Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.dom4j.rule.Stylesheet
public class Stylesheet
extends java.lang.Object
Stylesheet
implements an XSLT stylesheet such that rules can
be added to the stylesheet and the stylesheet can be applied to a source
document or node.
Constructor Summary | |
|
Method Summary | |
void | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
String |
|
Action |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void | |
void |
|
void |
|
public void addRule(Rule rule)
Add a rule to this stylesheet.
- Parameters:
rule
- the rule to add
public void applyTemplates(Object input) throws Exception
If input is aNode
, this will processes all of the children of that node. If input is aList
ofNodes
s, these nodes will be iterated and all children of each node will be processed.
- Parameters:
input
- the input object, this can either be aNode
or aList
public void applyTemplates(Object input, String mode) throws Exception
Processes the input object in the given mode. If input is aNode
, this will processes all of the children of that node. If input is aList
ofNodes
s, these nodes will be iterated and all children of each node will be processed.
- Parameters:
input
- the input object, this can either be aNode
or aList
mode
- the mode
public void applyTemplates(Object input, XPath xpath) throws Exception
Processes the result of the xpath expression. The xpath expression is evaluated against the provided input object.
- Parameters:
input
- the input objectxpath
- the xpath expression
public void applyTemplates(Object input, XPath xpath, String mode) throws Exception
Processes the result of the xpath expression in the given mode. The xpath expression is evaluated against the provided input object.
- Parameters:
input
- the input objectxpath
- the xpath expressionmode
- the mode
public void applyTemplates(Object input, org.jaxen.XPath xpath) throws Exception
Deprecated. Use
applyTemplates(Object,XPath)
instead.Processes the result of the xpath expression. The xpath expression is evaluated against the provided input object.
- Parameters:
input
- the input objectxpath
- the xpath expression
public void applyTemplates(Object input, org.jaxen.XPath xpath, String mode) throws Exception
Deprecated. Use
applyTemplates(Object,XPath,String)
instead.Processes the result of the xpath expression in the given mode. The xpath expression is evaluated against the provided input object.
- Parameters:
input
- the input objectxpath
- the xpath expressionmode
- the mode
public void clear()
public String getModeName()
DOCUMENT ME!
- Returns:
- the name of the mode the stylesheet uses by default
public Action getValueOfAction()
DOCUMENT ME!
- Returns:
- the default value-of action which is used in the default rules for the pattern "text()|@"
public void removeRule(Rule rule)
Removes the specified rule from this stylesheet.
- Parameters:
rule
- the rule to remove
public void run(List list) throws Exception
public void run(List list, String mode) throws Exception
public void run(Object input) throws Exception
Runs this stylesheet on the given input which should be either a Node or a List of Node objects.
- Parameters:
input
- the input to run this stylesheet on
public void run(Object input, String mode) throws Exception
public void setModeName(String modeName)
Sets the name of the mode that the stylesheet uses by default.
- Parameters:
modeName
- DOCUMENT ME!
public void setValueOfAction(Action valueOfAction)
Sets the default value-of action which is used in the default rules for the pattern "text()|@"
- Parameters:
valueOfAction
- DOCUMENT ME!