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, removeErrorObserverpublic 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.ContentHandlercharacters in interface org.xml.sax.DocumentHandlerchars - 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.SAXExceptionpublic void endDocument()
throws org.xml.sax.SAXException
endDocument in interface org.xml.sax.ContentHandlerendDocument in interface org.xml.sax.DocumentHandlerorg.xml.sax.SAXExceptionpublic void endElement(java.lang.String name)
throws org.xml.sax.SAXException
DocumentHandler#endElement
endElement in interface org.xml.sax.DocumentHandlername - the name of the elementorg.xml.sax.SAXExceptionpublic 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.ContentHandlernamespaceURI - the namespace URI of the elementlocalName - the unqualified name of the elementqName - the qualified name of the elementorg.xml.sax.SAXExceptionpublic void endPrefixMapping(java.lang.String prefix)
throws org.xml.sax.SAXException
endPrefixMapping in interface org.xml.sax.ContentHandlerprefix - the namespace prefixorg.xml.sax.SAXExceptionpublic void ignorableWhitespace(char[] chars,
int start,
int length)
throws org.xml.sax.SAXException
ignorableWhitespace in interface org.xml.sax.ContentHandlerignorableWhitespace in interface org.xml.sax.DocumentHandlerchars - 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.SAXExceptionpublic void processingInstruction(java.lang.String target,
java.lang.String data)
throws org.xml.sax.SAXException
processingInstruction in interface org.xml.sax.ContentHandlerprocessingInstruction in interface org.xml.sax.DocumentHandlertarget - the target of the processing instructiondata - the content of the processing instructionorg.xml.sax.SAXExceptionpublic void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator in interface org.xml.sax.ContentHandlersetDocumentLocator in interface org.xml.sax.DocumentHandlerlocator - 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.ContentHandlername - the name of the skipped entityorg.xml.sax.SAXExceptionpublic void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.ContentHandlerstartDocument in interface org.xml.sax.DocumentHandlerorg.xml.sax.SAXExceptionpublic void startElement(java.lang.String name,
org.xml.sax.AttributeList atts)
throws org.xml.sax.SAXException
DocumentHandler#startElement
startElement in interface org.xml.sax.DocumentHandlername - the name of the elementatts - the AttributeList containing the associated
attributes for the elementorg.xml.sax.SAXExceptionpublic 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.ContentHandlername - the name of the elementatts - the Attributes containing the associated
attributes for the elementorg.xml.sax.SAXExceptionpublic void startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
throws org.xml.sax.SAXException
startPrefixMapping in interface org.xml.sax.ContentHandlerprefix - the namespace prefixuri - the namespace URIorg.xml.sax.SAXException