Package org.exolab.adaptx.xslt
Class XSLTReader
java.lang.Object
org.exolab.adaptx.util.ErrorObserverAdapter
org.exolab.adaptx.xslt.XSLTReader
- All Implemented Interfaces:
ErrorObserver
A class for reading an XSLT stylesheet from a stream or file.
- Version:
- $Revision: 3925 $ $Date: 2003-10-01 10:50:32 +0200 (Wed, 01 Oct 2003) $
Modifcations 19990804: Mike Los (comments with MEL) - modified #readDocument to close InputStream
- Author:
- Keith Visco
-
Field Summary
Fields inherited from interface org.exolab.adaptx.util.ErrorObserver
FATAL, NORMAL, WARNING
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addErrorObserver
(ErrorObserver observer) Adds the given ErrorObserver to the list of ErrorObservers for this XSLReaderReturns the URIResolver being used by this XSLReaderReads an XSL stylesheet from the given uri (filename)Reads an XSL stylesheet from the given uri, using the given documentBase to resolve relative URI's.Reads the XSLStylesheet pointed to by the given URLread
(URILocation location) Reads an XSLStylesheet from the given URILocationReads an XSL stylesheet using the given DOM DocumentReads an XSL stylesheet using the given DOM Noderead
(InputSource source) Reads an XSL stylesheet from the given uri (filename)void
setEntityResolver
(EntityResolver resolver) Sets an EntityResolver to be passed to the underlying XML parser.void
setURIResolver
(URIResolver resolver) Sets the URIResolver for this XSLReaderMethods inherited from class org.exolab.adaptx.util.ErrorObserverAdapter
receiveError, receiveError, receiveError, receiveError, receiveError, receiveError, removeAllErrorObservers, removeErrorObserver
-
Constructor Details
-
XSLTReader
public XSLTReader()Creates a new Default XSLTReader -
XSLTReader
-
-
Method Details
-
addErrorObserver
Adds the given ErrorObserver to the list of ErrorObservers for this XSLReader- Overrides:
addErrorObserver
in classErrorObserverAdapter
- Parameters:
observer
- the ErrorObserver to add
-
getURIResolver
Returns the URIResolver being used by this XSLReader- Returns:
- the URIResolver being used by this XSLReader
-
read
Reads the XSLStylesheet pointed to by the given URL- Parameters:
url
- the URL of the stylesheet- Returns:
- the XSLStylesheet
- Throws:
XSLException
IOException
-
read
Reads an XSL stylesheet using the given DOM Document- Parameters:
filename
- the full path and filename of the Stylesheet which is used for resolving relative URIs.Document
- the DOM Document that is the Stylesheet- Throws:
XSLException
-
read
Reads an XSL stylesheet using the given DOM Node- Parameters:
node
- the DOM Node that contains the Stylesheetfilename
- the full path and filename of the Stylesheet which is used for resolving relative URIs.- Throws:
XSLException
-
read
Reads an XSL stylesheet from the given uri (filename)- Parameters:
uri
- the file name of the XSLT stylesheet to read- Returns:
- the new XSLStylesheet
- Throws:
XSLException
IOException
-
read
Reads an XSL stylesheet from the given uri (filename)- Parameters:
uri
- the file name of the XSLT stylesheet to read- Returns:
- the new XSLStylesheet
- Throws:
XSLException
IOException
-
read
Reads an XSL stylesheet from the given uri, using the given documentBase to resolve relative URI's.- Parameters:
uri
- the file name of the XSLT stylesheet to read- Returns:
- the new XSLStylesheet
- Throws:
XSLException
IOException
-
read
Reads an XSLStylesheet from the given URILocation- Parameters:
location
- the URILocation of the XSLT stylesheet- Returns:
- the new XSLStylesheet
- Throws:
XSLException
IOException
-
setEntityResolver
Sets an EntityResolver to be passed to the underlying XML parser. The EntityResolver will be passed to any SAX parser. If no SAX parser is utilized during the reading of the stylesheet, the resolver will be ignored.- Parameters:
resolver
- the EntityResolver to use
-
setURIResolver
Sets the URIResolver for this XSLReader- Parameters:
resolver
- the URIResolver this XSLReader should use for resolving all URIs.
-