Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jdom.transform
Class JDOMResult.DocumentBuilder  view JDOMResult.DocumentBuilder download JDOMResult.DocumentBuilder.java

java.lang.Object
  extended byorg.xml.sax.helpers.XMLFilterImpl
      extended byorg.jdom.transform.JDOMResult.DocumentBuilder
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.ext.LexicalHandler, org.xml.sax.XMLFilter, org.xml.sax.XMLReader
Enclosing class:
JDOMResult

private class JDOMResult.DocumentBuilder
extends org.xml.sax.helpers.XMLFilterImpl
implements org.xml.sax.ext.LexicalHandler


Field Summary
private  JDOMResult.FragmentHandler saxHandler
          The actual JDOM document builder.
private  boolean startDocumentReceived
          Whether the startDocument event was received.
 
Fields inherited from class org.xml.sax.helpers.XMLFilterImpl
 
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

saxHandler

private JDOMResult.FragmentHandler saxHandler
The actual JDOM document builder.


startDocumentReceived

private boolean startDocumentReceived
Whether the startDocument event was received. Some XSLT processors such as Oracle's do not fire this event.

Constructor Detail

JDOMResult.DocumentBuilder

public JDOMResult.DocumentBuilder()
Public default constructor.

Method Detail

getResult

public java.util.List getResult()
Returns the result of an XSL Transformation.


ensureInitialization

private void ensureInitialization()
                           throws org.xml.sax.SAXException

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
[SAX ContentHandler interface support] Processes a start of document event.

This implementation creates a new JDOM document builder and marks the current result as "under construction".

Specified by:
startDocument in interface org.xml.sax.ContentHandler

startElement

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
[SAX ContentHandler interface support] Receives notification of the beginning of an element.

This implementation ensures that startDocument() has been called prior processing an element.

Specified by:
startElement in interface org.xml.sax.ContentHandler

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
                        throws org.xml.sax.SAXException
[SAX ContentHandler interface support] Begins the scope of a prefix-URI Namespace mapping.

Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
[SAX ContentHandler interface support] Receives notification of character data.

Specified by:
characters in interface org.xml.sax.ContentHandler

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws org.xml.sax.SAXException
[SAX ContentHandler interface support] Receives notification of ignorable whitespace in element content.

Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
[SAX ContentHandler interface support] Receives notification of a processing instruction.

Specified by:
processingInstruction in interface org.xml.sax.ContentHandler

skippedEntity

public void skippedEntity(java.lang.String name)
                   throws org.xml.sax.SAXException
[SAX ContentHandler interface support] Receives notification of a skipped entity.

Specified by:
skippedEntity in interface org.xml.sax.ContentHandler

startDTD

public void startDTD(java.lang.String name,
                     java.lang.String publicId,
                     java.lang.String systemId)
              throws org.xml.sax.SAXException
[SAX LexicalHandler interface support] Reports the start of DTD declarations, if any.

Specified by:
startDTD in interface org.xml.sax.ext.LexicalHandler

endDTD

public void endDTD()
            throws org.xml.sax.SAXException
[SAX LexicalHandler interface support] Reports the end of DTD declarations.

Specified by:
endDTD in interface org.xml.sax.ext.LexicalHandler

startEntity

public void startEntity(java.lang.String name)
                 throws org.xml.sax.SAXException
[SAX LexicalHandler interface support] Reports the beginning of some internal and external XML entities.

Specified by:
startEntity in interface org.xml.sax.ext.LexicalHandler

endEntity

public void endEntity(java.lang.String name)
               throws org.xml.sax.SAXException
[SAX LexicalHandler interface support] Reports the end of an entity.

Specified by:
endEntity in interface org.xml.sax.ext.LexicalHandler

startCDATA

public void startCDATA()
                throws org.xml.sax.SAXException
[SAX LexicalHandler interface support] Reports the start of a CDATA section.

Specified by:
startCDATA in interface org.xml.sax.ext.LexicalHandler

endCDATA

public void endCDATA()
              throws org.xml.sax.SAXException
[SAX LexicalHandler interface support] Reports the end of a CDATA section.

Specified by:
endCDATA in interface org.xml.sax.ext.LexicalHandler

comment

public void comment(char[] ch,
                    int start,
                    int length)
             throws org.xml.sax.SAXException
[SAX LexicalHandler interface support] Reports an XML comment anywhere in the document.

Specified by:
comment in interface org.xml.sax.ext.LexicalHandler