org.dom4j.rule
Class Stylesheet

java.lang.Object
  |
  +--org.dom4j.rule.Stylesheet

public class Stylesheet
extends 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.

Version:
$Revision: 1.7 $
Author:
James Strachan

Constructor Summary
Stylesheet()
           
 
Method Summary
 void addRule(Rule rule)
           
 void applyTemplates(Object input)
           
 void applyTemplates(Object input, XPath xpath)
           
 void applyTemplates(Object input, org.jaxen.XPath xpath)
           
 void clear()
           
protected  Mode getMode()
           
 String getModeName()
           
 Action getValueOfAction()
           
 void removeRule(Rule rule)
           
 void run(List list)
           
 void run(Node node)
           
 void run(Object input)
          Runs this stylesheet on the given input which should be either a Node or a List of Node objects.
 void setModeName(String modeName)
          Sets the name of the mode that the stylesheet uses by default.
 void setValueOfAction(Action valueOfAction)
          Sets the default value-of action which is used in the default rules for the pattern "text()|@*"
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stylesheet

public Stylesheet()
Method Detail

addRule

public void addRule(Rule rule)

removeRule

public void removeRule(Rule rule)

run

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.

Exception

run

public void run(List list)
         throws Exception
Exception

run

public void run(Node node)
         throws Exception
Exception

applyTemplates

public void applyTemplates(Object input,
                           XPath xpath)
                    throws Exception
Exception

applyTemplates

public void applyTemplates(Object input,
                           org.jaxen.XPath xpath)
                    throws Exception
Exception

applyTemplates

public void applyTemplates(Object input)
                    throws Exception
Exception

clear

public void clear()

getModeName

public String getModeName()
Returns:
the name of the mode the stylesheet uses by default

setModeName

public void setModeName(String modeName)
Sets the name of the mode that the stylesheet uses by default.


getValueOfAction

public Action getValueOfAction()
Returns:
the default value-of action which is used in the default rules for the pattern "text()|@*"

setValueOfAction

public void setValueOfAction(Action valueOfAction)
Sets the default value-of action which is used in the default rules for the pattern "text()|@*"


getMode

protected Mode getMode()


Copyright © 2002-2003 MetaStuff Ltd.. All Rights Reserved.