org.exolab.adaptx.xslt.util

Class StylesheetHandler

Implemented Interfaces:
DocumentHandler, ErrorObserver

public class StylesheetHandler
extends ErrorObserverAdapter
implements DocumentHandler

A class which implements DocumentHandler and is used by the XSLReader when reading an XSLT stylsheet.

Version:
$Revision: 1.1.1.1 $ $Date: 2003/03/01 07:39:58 $

Author:
Keith Visco

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

FATAL, NORMAL, WARNING

Constructor Summary

StylesheetHandler()
Creates a new StylesheetHandler
StylesheetHandler(XSLTReader xsltReader)
Creates a new StylesheetHandler using the given XSLReader.

Method Summary

void
characters(char[] chars, int start, int length)
Signals the start of characters
void
endDocument()
Signals the end of the document
void
endElement(String name)
Signals the start of element
XSLTStylesheet
getStylesheet()
Return the XSLStylesheet created by this StylesheetHandler
void
ignorableWhitespace(char[] chars, int start, int length)
Signals the start of ignorable whitespace characters
void
processingInstruction(String target, String data)
Signals to recieve a processing instruction
void
setDocumentLocator(Locator locator)
Sets the document locator
void
setURILocation(URILocation location)
Sets the URILocation for the stylesheet being read
void
setURIResolver(URIResolver resolver)
Sets the URIResolver for this StylesheetHandler
void
startDocument()
Signals the start of a document
void
startElement(String name, AttributeList atts)
Signals the start of element

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

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

Constructor Details

StylesheetHandler

public StylesheetHandler()
Creates a new StylesheetHandler


StylesheetHandler

public StylesheetHandler(XSLTReader xsltReader)
Creates a new StylesheetHandler using the given XSLReader.

Parameters:
xsltReader - the XSLTReader to use when reading imported or included stylesheets

Method Details

characters

public void characters(char[] chars,
                       int start,
                       int length)
            throws org.xml.sax.SAXException
Signals the start of characters

Parameters:
chars - the character array containing the characters to receive
start - the index into the character array to start receiving characters at
length - the number of characters to recieve


endDocument

public void endDocument()
            throws org.xml.sax.SAXException
Signals the end of the document


endElement

public void endElement(String name)
            throws org.xml.sax.SAXException
Signals the start of element

Parameters:
name - the name of the element


getStylesheet

public XSLTStylesheet getStylesheet()
Return the XSLStylesheet created by this StylesheetHandler

Returns:
the XSLStylesheet created by this StylesheetHandler


ignorableWhitespace

public void ignorableWhitespace(char[] chars,
                                int start,
                                int length)
            throws org.xml.sax.SAXException
Signals the start of ignorable whitespace characters

Parameters:
chars - the character array containing the characters to receive
start - the index into the character array to start receiving characters at
length - the number of characters to recieve


processingInstruction

public void processingInstruction(String target,
                                  String data)
            throws org.xml.sax.SAXException
Signals to recieve a processing instruction

Parameters:
target - the target of the processing instruction
data - the content of the processing instruction


setDocumentLocator

public void setDocumentLocator(Locator locator)
Sets the document locator

Parameters:
locator - the Locator used by this DocumentHandler


setURILocation

public void setURILocation(URILocation location)
Sets the URILocation for the stylesheet being read

Parameters:
location - the URILocation for the stylesheet


setURIResolver

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

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


startDocument

public void startDocument()
            throws org.xml.sax.SAXException
Signals the start of a document


startElement

public void startElement(String name,
                         AttributeList atts)
            throws org.xml.sax.SAXException
Signals the start of element

Parameters:
name - the name of the element
atts - the AttributeList containing the associated attributes for the element