java.lang.Objectorg.xml.sax.helpers.XMLFilterImpl
JDOMResult.DocumentBuilder
private class JDOMResult.DocumentBuilder
Field Summary | |
---|---|
private JDOMResult.FragmentHandler |
saxHandler
The actual JDOM document builder. |
private boolean |
startDocumentReceived
Whether the startDocument event was received. |
Constructor Summary | |
---|---|
JDOMResult.DocumentBuilder()
Public default constructor. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
[SAX ContentHandler interface support] Receives notification of character data. |
void |
comment(char[] ch,
int start,
int length)
[SAX LexicalHandler interface support] Reports an XML comment anywhere in the document. |
void |
endCDATA()
[SAX LexicalHandler interface support] Reports the end of a CDATA section. |
void |
endDTD()
[SAX LexicalHandler interface support] Reports the end of DTD declarations. |
void |
endEntity(java.lang.String name)
[SAX LexicalHandler interface support] Reports the end of an entity. |
private void |
ensureInitialization()
|
java.util.List |
getResult()
Returns the result of an XSL Transformation. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
[SAX ContentHandler interface support] Receives notification of ignorable whitespace in element content. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
[SAX ContentHandler interface support] Receives notification of a processing instruction. |
void |
skippedEntity(java.lang.String name)
[SAX ContentHandler interface support] Receives notification of a skipped entity. |
void |
startCDATA()
[SAX LexicalHandler interface support] Reports the start of a CDATA section. |
void |
startDocument()
[SAX ContentHandler interface support] Processes a start of document event. |
void |
startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
[SAX LexicalHandler interface support] Reports the start of DTD declarations, if any. |
void |
startElement(java.lang.String nsURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
[SAX ContentHandler interface support] Receives notification of the beginning of an element. |
void |
startEntity(java.lang.String name)
[SAX LexicalHandler interface support] Reports the beginning of some internal and external XML entities. |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
[SAX ContentHandler interface support] Begins the scope of a prefix-URI Namespace mapping. |
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl |
---|
endDocument, endElement, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, notationDecl, parse, parse, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private JDOMResult.FragmentHandler saxHandler
private boolean startDocumentReceived
Constructor Detail |
---|
public JDOMResult.DocumentBuilder()
Method Detail |
---|
public java.util.List getResult()
null
if no new transformation occurred
since the result of the previous one was returned.private void ensureInitialization() throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void startDocument() throws org.xml.sax.SAXException
This implementation creates a new JDOM document builder and marks the current result as "under construction".
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class org.xml.sax.helpers.XMLFilterImpl
org.xml.sax.SAXException
- if any error occurred while creating
the document builder.public void startElement(java.lang.String nsURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
This implementation ensures that startDocument() has been called prior processing an element.
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.XMLFilterImpl
nsURI
- the Namespace URI, or the empty string if
the element has no Namespace URI or if
Namespace processing is not being performed.localName
- the local name (without prefix), or the
empty string if Namespace processing is
not being performed.qName
- the qualified name (with prefix), or the
empty string if qualified names are not
available.atts
- The attributes attached to the element. If
there are no attributes, it shall be an
empty Attributes object.
org.xml.sax.SAXException
- if any error occurred while creating
the document builder.public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
startPrefixMapping
in interface org.xml.sax.ContentHandler
startPrefixMapping
in class org.xml.sax.helpers.XMLFilterImpl
org.xml.sax.SAXException
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.XMLFilterImpl
org.xml.sax.SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException
ignorableWhitespace
in interface org.xml.sax.ContentHandler
ignorableWhitespace
in class org.xml.sax.helpers.XMLFilterImpl
org.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 class org.xml.sax.helpers.XMLFilterImpl
org.xml.sax.SAXException
public void skippedEntity(java.lang.String name) throws org.xml.sax.SAXException
skippedEntity
in interface org.xml.sax.ContentHandler
skippedEntity
in class org.xml.sax.helpers.XMLFilterImpl
org.xml.sax.SAXException
public void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
startDTD
in interface org.xml.sax.ext.LexicalHandler
name
- the document type name.publicId
- the declared public identifier for the
external DTD subset, or null
if none was declared.systemId
- the declared system identifier for the
external DTD subset, or null
if none was declared.
org.xml.sax.SAXException
- The application may raise an exception.public void endDTD() throws org.xml.sax.SAXException
endDTD
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
- The application may raise an exception.public void startEntity(java.lang.String name) throws org.xml.sax.SAXException
startEntity
in interface org.xml.sax.ext.LexicalHandler
name
- the name of the entity. If it is a parameter
entity, the name will begin with '%', and if it
is the external DTD subset, it will be "[dtd]".
org.xml.sax.SAXException
- The application may raise an exception.public void endEntity(java.lang.String name) throws org.xml.sax.SAXException
endEntity
in interface org.xml.sax.ext.LexicalHandler
name
- the name of the entity that is ending.
org.xml.sax.SAXException
- The application may raise an exception.public void startCDATA() throws org.xml.sax.SAXException
startCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
- The application may raise an exception.public void endCDATA() throws org.xml.sax.SAXException
endCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
- The application may raise an exception.public void comment(char[] ch, int start, int length) throws org.xml.sax.SAXException
comment
in interface org.xml.sax.ext.LexicalHandler
ch
- an array holding the characters in the comment.start
- the starting position in the array.length
- the number of characters to use from the array.
org.xml.sax.SAXException
- The application may raise an exception.