Class JDOMResult.FragmentHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by SAXHandler
          extended by JDOMResult.FragmentHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.ext.DeclHandler, org.xml.sax.ext.LexicalHandler
Enclosing class:
JDOMResult
private static class JDOMResult.FragmentHandler
extends SAXHandler

Field Summary
private  ElementdummyRoot
          A dummy root element required by SAXHandler that can only cope with well-formed documents.
 
Constructor Summary
JDOMResult.FragmentHandler(JDOMFactory factory)
          Public constructor.
 
Method Summary
private  java.util.ListgetDetachedContent(Element elt)
          Returns the content of a JDOM Element detached from it.
 java.util.ListgetResult()
          Returns the result of an XSL Transformation.
 
Methods inherited from class SAXHandler
attributeDecl, characters, comment, elementDecl, endCDATA, endDTD, endElement, endEntity, externalEntityDecl, flushCharacters, flushCharacters, getCurrentElement, getDocument, getDocumentLocator, getExpandEntities, getFactory, getIgnoringElementContentWhitespace, ignorableWhitespace, internalEntityDecl, notationDecl, processingInstruction, pushElement, setDocumentLocator, setExpandEntities, setIgnoringElementContentWhitespace, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping, unparsedEntityDecl
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, resolveEntity, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dummyRoot

private Element dummyRoot
A dummy root element required by SAXHandler that can only cope with well-formed documents.

Constructor Detail

JDOMResult.FragmentHandler

public JDOMResult.FragmentHandler(JDOMFactory factory)
Public constructor.

Method Detail

getResult

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

Returns:
the transformation result as a (possibly empty) list of JDOM nodes (Elements, Texts, Comments, PIs...).

getDetachedContent

private java.util.List getDetachedContent(Element elt)
Returns the content of a JDOM Element detached from it.

Parameters:
elt - the element to get the content from.
Returns:
a (possibly empty) list of JDOM nodes, detached from their parent.