org.exolab.adaptx.xslt
Class RuleProcessor
- ErrorObserver
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.
$Revision: 4530 $ $Date: 2004-07-28 23:29:07 -0400 (Wed, 28 Jul 2004) $
XSL_VENDOR
public static final String XSL_VENDOR
The XSL vendor property name
XSL_VENDOR_URL
public static final String XSL_VENDOR_URL
The XSL vendor-url property name
XSL_VERSION
public static final String XSL_VERSION
The XSL version property name
RuleProcessor
public RuleProcessor(XSLTStylesheet xsl)
Create a RuleProcessor for the given XSL stylesheet
xsl
- the XSLStylesheet to process
addFunctionResolver
public void addFunctionResolver(FunctionResolver fnResolver)
Adds the given FunctionResolver used for resovling
extension functions.
fnResolver
- the FunctionResolver to add
org.exolab.adaptx.xpath.FunctionResolver
addMessageObserver
public void addMessageObserver(MessageObserver msgObserver)
Adds the given MessageObserver to this processors list
of MessageObservers
msgObserver
- the MessageObserver to add to this processors
list of MessageObservers
getParameter
public String getParameter(String name)
Returns the parameter value associated with the given name.
A call to #setParameter will associate a parameter
name
- the name of the parameter to retrieve the value of
- the parameter value associated with the given name.
getProperty
public String getProperty(String name)
Returns the property value that is associated with the given name.
name
- the name of the property to retrieve the value of
- the property value that is associated with the given name.
getURIResolver
public URIResolver getURIResolver()
Returns the URIResolver for resolving all URIs.
- the URIResolver for resolving all URIs.
process
public void process(XPathNode source,
ResultHandler handler)
Processes the given XML Document using this processors stylesheet.
source
- the XPathNode to processhandler
- the ResultHandler for the result tree
removeMessageObserver
public MessageObserver removeMessageObserver(MessageObserver msgObserver)
Removes the given MessageObserver from this processors list
of MessageObservers
msgObserver
- the MessageObserver to remove from this processors
list of MessageObservers
- the given MessageObserver if it was removed from the list,
otherwise return null
setParameter
public void setParameter(String name,
String value)
Sets a property which may be accessed from the XSLT
stylesheet via a call to the xslp:param extension function
name
- the name of the parametervalue
- the value of the parameter
setURIResolver
public void setURIResolver(URIResolver resolver)
Sets the URIResolver for resolving all URIs. If null,
the default URIResolver will be used.
resolver
- the URIResolver to use