All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.kvisco.xsl.RuleProcessor

com.kvisco.xsl.RuleProcessor

public class RuleProcessor
This class is the "template" rule processor which processes an XML document using it's XSLStylesheet. It's primary method #process starts with the "document" rule ("/"), specified or default, and runs through the XML Source tree processing all rules until there is nothing left to process.

Author:
Keith Visco

Variable Index

 o XSL_VENDOR
The XSL vendor property name
 o XSL_VENDOR_URL
The XSL vendor-url property name
 o XSL_VERSION
The XSL version property name

Constructor Index

 o RuleProcessor(XSLStylesheet, DOMPackage)
Create a RuleProcessor for the given XSL stylesheet

Method Index

 o addMessageObserver(MessageObserver)
Adds the given MessageObserver to this processors list of MessageObservers
 o getErrorWriter()
Retrieves the PrintWriter that this RuleProcessor prints it's error messages to.
 o getProperty(String)
Returns the property value that is associated with the given name.
 o process(Document)
Processes the given XML Document using this processors stylesheet
 o removeMessageObserver(MessageObserver)
Removes the given MessageObserver from this processors list of MessageObservers
 o setErrorWriter(OutputStream)
Sets the Writer for this RuleProcessor to print error messages to
 o setErrorWriter(Writer)
Sets the Writer for this RuleProcessor to print error messages to

Variables

 o XSL_VERSION
 public static final String XSL_VERSION
The XSL version property name

 o XSL_VENDOR
 public static final String XSL_VENDOR
The XSL vendor property name

 o XSL_VENDOR_URL
 public static final String XSL_VENDOR_URL
The XSL vendor-url property name

Constructors

 o RuleProcessor
 public RuleProcessor(XSLStylesheet xsl,
                      DOMPackage domPackage)
Create a RuleProcessor for the given XSL stylesheet

Parameters:
xsl - the XSLStylesheet to process
domPackage - the DOMPackage to use when creating the result tree

Methods

 o addMessageObserver
 public void addMessageObserver(MessageObserver msgObserver)
Adds the given MessageObserver to this processors list of MessageObservers

Parameters:
msgObserver - the MessageObserver to add to this processors list of MessageObservers
 o getProperty
 public String getProperty(String name)
Returns the property value that is associated with the given name.

Returns:
the property value that is associated with the given name.
 o process
 public Document process(Document xmlDocument)
Processes the given XML Document using this processors stylesheet

Parameters:
xmlDocument - the Document to process
Returns:
the result tree as a DOM NodeList
See Also:
process
 o removeMessageObserver
 public MessageObserver removeMessageObserver(MessageObserver msgObserver)
Removes the given MessageObserver from this processors list of MessageObservers

Parameters:
msgObserver - the MessageObserver to remove from this processors list of MessageObservers
Returns:
the given MessageObserver if it was removed from the list, otherwise return null
 o setErrorWriter
 public void setErrorWriter(OutputStream stream)
Sets the Writer for this RuleProcessor to print error messages to

Parameters:
stream - the OutputStream to print error messages to.
 o setErrorWriter
 public void setErrorWriter(Writer writer)
Sets the Writer for this RuleProcessor to print error messages to

Parameters:
writer - the Writer to print error messages to.
 o getErrorWriter
 public PrintWriter getErrorWriter()
Retrieves the PrintWriter that this RuleProcessor prints it's error messages to.

Returns:
the PrintWriter that this RuleProcessor prints it's error messages to.

All Packages  Class Hierarchy  This Package  Previous  Next  Index