public class StylesheetHandler extends ErrorObserverAdapter implements org.xml.sax.ContentHandler, org.xml.sax.DocumentHandler
FATAL, NORMAL, WARNING
Constructor and Description |
---|
StylesheetHandler()
Creates a new StylesheetHandler
|
StylesheetHandler(XSLTReader xsltReader)
Creates a new StylesheetHandler using the given XSLReader.
|
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] chars,
int start,
int length)
Signals the start of characters
|
void |
endDocument()
Signals the end of the document
|
void |
endElement(java.lang.String name)
Signals the end of an element
|
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
Signals the end of an element
|
void |
endPrefixMapping(java.lang.String prefix)
Ends the namespace prefix mapping
|
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(java.lang.String target,
java.lang.String data)
Signals to recieve a processing instruction
|
void |
setDocumentLocator(org.xml.sax.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 |
skippedEntity(java.lang.String name)
ContentHandler#skippedEntity
|
void |
startDocument()
Signals the start of a document
|
void |
startElement(java.lang.String name,
org.xml.sax.AttributeList atts)
Signals the start of element
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
Signals the start of element
|
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
Starts the namespace prefix mapping
|
addErrorObserver, receiveError, receiveError, receiveError, receiveError, receiveError, receiveError, removeAllErrorObservers, removeErrorObserver
public StylesheetHandler()
public StylesheetHandler(XSLTReader xsltReader)
xsltReader
- the XSLTReader to use when reading imported
or included stylesheetspublic XSLTStylesheet getStylesheet()
public void setURILocation(URILocation location)
location
- the URILocation for the stylesheetpublic void setURIResolver(URIResolver resolver)
resolver
- the URIResolver this StylesheetHandler should
use for resolving all URIs.public void characters(char[] chars, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in interface org.xml.sax.DocumentHandler
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 recieveorg.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in interface org.xml.sax.DocumentHandler
org.xml.sax.SAXException
public void endElement(java.lang.String name) throws org.xml.sax.SAXException
DocumentHandler#endElement
endElement
in interface org.xml.sax.DocumentHandler
name
- the name of the elementorg.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
ContentHandler#endElement
endElement
in interface org.xml.sax.ContentHandler
namespaceURI
- the namespace URI of the elementlocalName
- the unqualified name of the elementqName
- the qualified name of the elementorg.xml.sax.SAXException
public void endPrefixMapping(java.lang.String prefix) throws org.xml.sax.SAXException
endPrefixMapping
in interface org.xml.sax.ContentHandler
prefix
- the namespace prefixorg.xml.sax.SAXException
public void ignorableWhitespace(char[] chars, int start, int length) throws org.xml.sax.SAXException
ignorableWhitespace
in interface org.xml.sax.ContentHandler
ignorableWhitespace
in interface org.xml.sax.DocumentHandler
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 recieveorg.xml.sax.SAXException
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.ContentHandler
processingInstruction
in interface org.xml.sax.DocumentHandler
target
- the target of the processing instructiondata
- the content of the processing instructionorg.xml.sax.SAXException
public void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface org.xml.sax.ContentHandler
setDocumentLocator
in interface org.xml.sax.DocumentHandler
locator
- the Locator used by this DocumentHandlerpublic void skippedEntity(java.lang.String name) throws org.xml.sax.SAXException
ContentHandler#skippedEntity
Recieves notification of a skipped entityskippedEntity
in interface org.xml.sax.ContentHandler
name
- the name of the skipped entityorg.xml.sax.SAXException
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in interface org.xml.sax.DocumentHandler
org.xml.sax.SAXException
public void startElement(java.lang.String name, org.xml.sax.AttributeList atts) throws org.xml.sax.SAXException
DocumentHandler#startElement
startElement
in interface org.xml.sax.DocumentHandler
name
- the name of the elementatts
- the AttributeList containing the associated
attributes for the elementorg.xml.sax.SAXException
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
ContentHandler#startElement
startElement
in interface org.xml.sax.ContentHandler
name
- the name of the elementatts
- the Attributes containing the associated
attributes for the elementorg.xml.sax.SAXException
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
startPrefixMapping
in interface org.xml.sax.ContentHandler
prefix
- the namespace prefixuri
- the namespace URIorg.xml.sax.SAXException