All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.kvisco.xsl.XSLReader

com.kvisco.xsl.XSLReader

public class XSLReader
A class for reading an XSL Stylesheet from a stream or file.

Author:
Keith Visco
  Modifcations
    19990804: Mike Los (comments with MEL)
        - modified #readDocument to close InputStream
 

Constructor Index

 o XSLReader()
Creates a new XSLReader using the Default DOMReader
 o XSLReader(DOMReader)
Creates a new XSLReader using the given DOMReader

Method Index

 o createXSLObject(XSLStylesheet, Element)
Creates the corresponding XSLObject for the given element
 o readStylesheet(Document, String)
Parses a DOM Document into an XSL stylesheet
 o readStylesheet(InputStream, String)
Reads an XSLStylesheet from the given InputStream.
 o readStylesheet(String)
Reads an XSL stylesheet from the given filename
 o setErrorStream(PrintStream)
Sets the PrintStream to print all errors to.
 o setErrorStream(Writer)
Sets the Writer to print all errors to.

Constructors

 o XSLReader
 public XSLReader() throws Exception
Creates a new XSLReader using the Default DOMReader

Throws: when
this XSLReader cannot load the Default DOMReader
 o XSLReader
 public XSLReader(DOMReader domReader)
Creates a new XSLReader using the given DOMReader

Methods

 o readStylesheet
 public XSLStylesheet readStylesheet(Document document,
                                     String filename) throws XSLException
Parses a DOM Document into an XSL stylesheet

Returns:
the XSLStylesheet
 o readStylesheet
 public XSLStylesheet readStylesheet(String filename) throws XSLException
Reads an XSL stylesheet from the given filename

Parameters:
filename - the file name of the XSL Stylesheet
Returns:
the new XSLStylesheet
 o readStylesheet
 public XSLStylesheet readStylesheet(InputStream xslInput,
                                     String filename) throws XSLException
Reads an XSLStylesheet from the given InputStream.

Parameters:
xslInput - the InputStream to read the Stylesheet from.
filename - the file name to use for the href of the Stylesheet, the document base of this Stylesheet for imports, and for error reporting.
Returns:
the new XSLStylesheet
 o createXSLObject
 public XSLObject createXSLObject(XSLStylesheet parent,
                                  Element element) throws XSLException
Creates the corresponding XSLObject for the given element

Parameters:
parent - the XSLStylesheet in while the XSLObject will be inserted
element - the Element to create the XSLObject from
 o setErrorStream
 public void setErrorStream(Writer errWriter)
Sets the Writer to print all errors to.

Parameters:
errWriter - the Writer to use for error reporting
 o setErrorStream
 public void setErrorStream(PrintStream errStream)
Sets the PrintStream to print all errors to.

Parameters:
errStream - the PrintStream to use for error reporting

All Packages  Class Hierarchy  This Package  Previous  Next  Index