Class StylesheetHandler
java.lang.Object
org.exolab.adaptx.util.ErrorObserverAdapter
org.exolab.adaptx.xslt.util.StylesheetHandler
- All Implemented Interfaces:
ErrorObserver, ContentHandler, DocumentHandler
- Direct Known Subclasses:
TemplatesHandlerImpl
public class StylesheetHandler
extends ErrorObserverAdapter
implements ContentHandler, DocumentHandler
A class which implements a SAX DocumentHandler and
ContentHandler and is used by the XSLTReader when
reading an XSLT stylesheet.
- Version:
- $Revision: 3936 $ $Date: 2003-10-02 12:03:18 +0200 (Thu, 02 Oct 2003) $
- Author:
- Keith Visco
-
Field Summary
Fields inherited from interface ErrorObserver
FATAL, NORMAL, WARNING -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new StylesheetHandlerStylesheetHandler(XSLTReader xsltReader) Creates a new StylesheetHandler using the given XSLReader. -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] chars, int start, int length) Signals the start of charactersvoidSignals the end of the documentvoidendElement(String name) Signals the end of an elementvoidendElement(String namespaceURI, String localName, String qName) Signals the end of an elementvoidendPrefixMapping(String prefix) Ends the namespace prefix mappingReturn the XSLStylesheet created by this StylesheetHandlervoidignorableWhitespace(char[] chars, int start, int length) Signals the start of ignorable whitespace charactersvoidprocessingInstruction(String target, String data) Signals to recieve a processing instructionvoidsetDocumentLocator(Locator locator) Sets the document locatorvoidsetURILocation(URILocation location) Sets the URILocation for the stylesheet being readvoidsetURIResolver(URIResolver resolver) Sets the URIResolver for this StylesheetHandlervoidskippedEntity(String name) ContentHandler#skippedEntityvoidSignals the start of a documentvoidstartElement(String namespaceURI, String localName, String qName, Attributes attributes) Signals the start of elementvoidstartElement(String name, AttributeList atts) Signals the start of elementvoidstartPrefixMapping(String prefix, String uri) Starts the namespace prefix mappingMethods inherited from class ErrorObserverAdapter
addErrorObserver, receiveError, receiveError, receiveError, receiveError, receiveError, receiveError, removeAllErrorObservers, removeErrorObserverMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContentHandler
declaration
-
Constructor Details
-
StylesheetHandler
public StylesheetHandler()Creates a new StylesheetHandler -
StylesheetHandler
Creates a new StylesheetHandler using the given XSLReader.- Parameters:
xsltReader- the XSLTReader to use when reading imported or included stylesheets
-
-
Method Details
-
getStylesheet
Return the XSLStylesheet created by this StylesheetHandler- Returns:
- the XSLStylesheet created by this StylesheetHandler
-
setURILocation
Sets the URILocation for the stylesheet being read- Parameters:
location- the URILocation for the stylesheet
-
setURIResolver
Sets the URIResolver for this StylesheetHandler- Parameters:
resolver- the URIResolver this StylesheetHandler should use for resolving all URIs.
-
characters
Signals the start of characters- Specified by:
charactersin interfaceContentHandler- Specified by:
charactersin interfaceDocumentHandler- Parameters:
chars- the character array containing the characters to receivestart- the index into the character array to start receiving characters atlength- the number of characters to recieve- Throws:
SAXException
-
endDocument
Signals the end of the document- Specified by:
endDocumentin interfaceContentHandler- Specified by:
endDocumentin interfaceDocumentHandler- Throws:
SAXException
-
endElement
Signals the end of an elementDocumentHandler#endElement
- Specified by:
endElementin interfaceDocumentHandler- Parameters:
name- the name of the element- Throws:
SAXException
-
endElement
Signals the end of an elementContentHandler#endElement
- Specified by:
endElementin interfaceContentHandler- Parameters:
namespaceURI- the namespace URI of the elementlocalName- the unqualified name of the elementqName- the qualified name of the element- Throws:
SAXException
-
endPrefixMapping
Ends the namespace prefix mapping- Specified by:
endPrefixMappingin interfaceContentHandler- Parameters:
prefix- the namespace prefix- Throws:
SAXException
-
ignorableWhitespace
Signals the start of ignorable whitespace characters- Specified by:
ignorableWhitespacein interfaceContentHandler- Specified by:
ignorableWhitespacein interfaceDocumentHandler- Parameters:
chars- the character array containing the characters to receivestart- the index into the character array to start receiving characters atlength- the number of characters to recieve- Throws:
SAXException
-
processingInstruction
Signals to recieve a processing instruction- Specified by:
processingInstructionin interfaceContentHandler- Specified by:
processingInstructionin interfaceDocumentHandler- Parameters:
target- the target of the processing instructiondata- the content of the processing instruction- Throws:
SAXException
-
setDocumentLocator
Sets the document locator- Specified by:
setDocumentLocatorin interfaceContentHandler- Specified by:
setDocumentLocatorin interfaceDocumentHandler- Parameters:
locator- the Locator used by this DocumentHandler
-
skippedEntity
ContentHandler#skippedEntity
Recieves notification of a skipped entity- Specified by:
skippedEntityin interfaceContentHandler- Parameters:
name- the name of the skipped entity- Throws:
SAXException
-
startDocument
Signals the start of a document- Specified by:
startDocumentin interfaceContentHandler- Specified by:
startDocumentin interfaceDocumentHandler- Throws:
SAXException
-
startElement
Signals the start of elementDocumentHandler#startElement
- Specified by:
startElementin interfaceDocumentHandler- Parameters:
name- the name of the elementatts- the AttributeList containing the associated attributes for the element- Throws:
SAXException
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes attributes) throws SAXException Signals the start of elementContentHandler#startElement
- Specified by:
startElementin interfaceContentHandler- Parameters:
name- the name of the elementatts- the Attributes containing the associated attributes for the element- Throws:
SAXException
-
startPrefixMapping
Starts the namespace prefix mapping- Specified by:
startPrefixMappingin interfaceContentHandler- Parameters:
prefix- the namespace prefixuri- the namespace URI- Throws:
SAXException
-