org.exolab.adaptx.xslt

Class XSLTReader

Implemented Interfaces:
ErrorObserver

public class XSLTReader
extends ErrorObserverAdapter

A class for reading an XSLT stylesheet from a stream or file.

Version:
$Revision: 1.1.1.1 $ $Date: 2003/03/01 07:39:53 $
Modifcations
19990804: Mike Los (comments with MEL)
- modified #readDocument to close InputStream

Author:
Keith Visco

Fields inherited from interface org.exolab.adaptx.util.ErrorObserver

FATAL, NORMAL, WARNING

Constructor Summary

XSLTReader()
Creates a new Default XSLTReader
XSLTReader(URIResolver uriResolver)

Method Summary

void
addErrorObserver(ErrorObserver observer)
Adds the given ErrorObserver to the list of ErrorObservers for this XSLReader
URIResolver
getURIResolver()
Returns the URIResolver being used by this XSLReader
XSLTStylesheet
read(Document document, String filename)
Reads an XSL stylesheet using the given DOM Document
XSLTStylesheet
read(InputSource source)
Reads an XSL stylesheet from the given uri (filename)
XSLTStylesheet
read(String uri)
Reads an XSL stylesheet from the given uri (filename)
XSLTStylesheet
read(String uri, String documentBase)
Reads an XSL stylesheet from the given uri, using the given documentBase to resolve relative URI's.
XSLTStylesheet
read(URL url)
Reads the XSLStylesheet pointed to by the given URL
XSLTStylesheet
read(URILocation location)
Reads an XSLStylesheet from the given URILocation
void
setURIResolver(URIResolver resolver)
Sets the URIResolver for this XSLReader

Methods inherited from class org.exolab.adaptx.util.ErrorObserverAdapter

addErrorObserver, receiveError, receiveError, receiveError, receiveError, receiveError, receiveError, removeAllErrorObservers, removeErrorObserver

Constructor Details

XSLTReader

public XSLTReader()
Creates a new Default XSLTReader


XSLTReader

public XSLTReader(URIResolver uriResolver)

Method Details

addErrorObserver

public void addErrorObserver(ErrorObserver observer)
Adds the given ErrorObserver to the list of ErrorObservers for this XSLReader
Overrides:
addErrorObserver in interface ErrorObserverAdapter

Parameters:
observer - the ErrorObserver to add


getURIResolver

public URIResolver getURIResolver()
Returns the URIResolver being used by this XSLReader

Returns:
the URIResolver being used by this XSLReader


read

public XSLTStylesheet read(Document document,
                           String filename)
            throws XSLException
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.


read

public XSLTStylesheet read(InputSource source)
            throws XSLException,
                   java.io.IOException
Reads an XSL stylesheet from the given uri (filename)

Parameters:

Returns:
the new XSLStylesheet

Throws:
XSLException -


read

public XSLTStylesheet read(String uri)
            throws XSLException,
                   java.io.IOException
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 -


read

public XSLTStylesheet read(String uri,
                           String documentBase)
            throws XSLException,
                   java.io.IOException
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 -


read

public XSLTStylesheet read(URL url)
            throws XSLException,
                   java.io.IOException
Reads the XSLStylesheet pointed to by the given URL

Parameters:
url - the URL of the stylesheet

Returns:
the XSLStylesheet


read

public XSLTStylesheet read(URILocation location)
            throws XSLException,
                   java.io.IOException
Reads an XSLStylesheet from the given URILocation

Parameters:
location - the URILocation of the XSLT stylesheet

Returns:
the new XSLStylesheet

Throws:
XSLException -


setURIResolver

public void setURIResolver(URIResolver resolver)
Sets the URIResolver for this XSLReader

Parameters:
resolver - the URIResolver this XSLReader should use for resolving all URIs.