net.sourceforge.xbrlcomposer
Class ContentHandlerImpl

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended bynet.sourceforge.xbrlcomposer.ContentHandlerImpl
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class ContentHandlerImpl
extends org.xml.sax.helpers.DefaultHandler


Constructor Summary
ContentHandlerImpl()
           
 
Method Summary
 void characters(char[] buf, int offset, int len)
          Copy characters (trimming white space as required) to the DTSImpl.
 void endDocument()
          The end of the document triggers stepping out of the document's container element
 void endElement(java.lang.String namespaceURI, java.lang.String sName, java.lang.String qName)
          The end of an element triggers processing of an extended link if we have reached the end of an extended link.
 void error(org.xml.sax.SAXParseException err)
          Report validation errors and carry on
 void ignorableWhitespace(char[] buf, int offset, int len)
          Ignore ignorable whitespace
 void processingInstruction(java.lang.String target, java.lang.String data)
          Copy across processing instructions to the DTSImpl
 void setDocumentLocator(org.xml.sax.Locator l)
          The locator for a document is stored as part of the DTSImpl object to facilitate resolution of URL's relative to that location.
 void setDTS(DTS dts)
          The Discoverable Taxonomy Set (DTSImpl) can be set for the content handler before it is used but it cannot be retrieved.
 void startDocument()
          The start of the document triggers creation of a container element for the document being parsed.
 void startElement(java.lang.String namespaceURI, java.lang.String lName, java.lang.String qName, org.xml.sax.Attributes attrs)
          All element processing is done by the DTSImpl object.
 void warning(org.xml.sax.SAXParseException err)
          Report validation warnings and carry on
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, fatalError, notationDecl, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentHandlerImpl

public ContentHandlerImpl()
Method Detail

setDTS

public void setDTS(DTS dts)
            throws org.xml.sax.SAXException
The Discoverable Taxonomy Set (DTSImpl) can be set for the content handler before it is used but it cannot be retrieved.

Throws:
org.xml.sax.SAXException

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator l)
The locator for a document is stored as part of the DTSImpl object to facilitate resolution of URL's relative to that location.


startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
The start of the document triggers creation of a container element for the document being parsed.

Throws:
org.xml.sax.SAXException

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
The end of the document triggers stepping out of the document's container element

Throws:
org.xml.sax.SAXException

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String lName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attrs)
                  throws org.xml.sax.SAXException
All element processing is done by the DTSImpl object. The only activities specific to this content handler relate to the specific treatment of extended links, locators and arcs.

Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String sName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
The end of an element triggers processing of an extended link if we have reached the end of an extended link. Otherwise, we step up to the parent element in the composite document unless the element that is ending did not ever become the current element in the composite document.

Throws:
org.xml.sax.SAXException

characters

public void characters(char[] buf,
                       int offset,
                       int len)
                throws org.xml.sax.SAXException
Copy characters (trimming white space as required) to the DTSImpl.

Throws:
org.xml.sax.SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] buf,
                                int offset,
                                int len)
                         throws org.xml.sax.SAXException
Ignore ignorable whitespace

Throws:
org.xml.sax.SAXException

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
Copy across processing instructions to the DTSImpl

Throws:
org.xml.sax.SAXException

error

public void error(org.xml.sax.SAXParseException err)
           throws org.xml.sax.SAXParseException
Report validation errors and carry on

Throws:
org.xml.sax.SAXParseException

warning

public void warning(org.xml.sax.SAXParseException err)
             throws org.xml.sax.SAXParseException
Report validation warnings and carry on

Throws:
org.xml.sax.SAXParseException