org.dom4j.rule
Class Stylesheet

java.lang.Object
  extended byorg.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.

Version:
$Revision: 1.6 $
Author:
James Strachan

Constructor Summary
Stylesheet()
           
 
Method Summary
 void addRule(Rule rule)
           
 void applyTemplates(java.lang.Object input)
           
 void applyTemplates(java.lang.Object input, XPath xpath)
           
 void applyTemplates(java.lang.Object input, org.jaxen.XPath xpath)
           
 void clear()
           
protected  Mode getMode()
           
 java.lang.String getModeName()
           
 Action getValueOfAction()
           
 void removeRule(Rule rule)
           
 void run(java.util.List list)
           
 void run(Node node)
           
 void run(java.lang.Object input)
          Runs this stylesheet on the given input which should be either a Node or a List of Node objects.
 void setModeName(java.lang.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(java.lang.Object input)
         throws java.lang.Exception
Runs this stylesheet on the given input which should be either a Node or a List of Node objects.

Throws:
java.lang.Exception

run

public void run(java.util.List list)
         throws java.lang.Exception
Throws:
java.lang.Exception

run

public void run(Node node)
         throws java.lang.Exception
Throws:
java.lang.Exception

applyTemplates

public void applyTemplates(java.lang.Object input,
                           XPath xpath)
                    throws java.lang.Exception
Throws:
java.lang.Exception

applyTemplates

public void applyTemplates(java.lang.Object input,
                           org.jaxen.XPath xpath)
                    throws java.lang.Exception
Throws:
java.lang.Exception

applyTemplates

public void applyTemplates(java.lang.Object input)
                    throws java.lang.Exception
Throws:
java.lang.Exception

clear

public void clear()

getModeName

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

setModeName

public void setModeName(java.lang.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 © 2001 MetaStuff Ltd. All Rights Reserved. Hosted by

SourceForge Logo