org.bibop.xml.utils
Class XMLExtendedCompiler

java.lang.Object
  |
  +--org.bibop.xml.utils.XMLExtendedCompiler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler

public final class XMLExtendedCompiler
extends java.lang.Object
implements org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler

Extended XMLCompiler with Lexical events support


Field Summary
static int CHARACTERS
           
static int COMMENT
          Lexical Events
private  int element
           
static int END_CDATA
           
static int END_DOCUMENT
           
static int END_DTD
           
static int END_ELEMENT
           
static int END_ENTITY
           
static int END_PREFIX_MAPPING
           
static int IGNORABLE_WHITESPACE
           
private  CompiledXMLOutputStream out
           
static int PROCESSING_INSTRUCTION
           
static int START_CDATA
           
static int START_DOCUMENT
           
static int START_DTD
           
static int START_ELEMENT
           
static int START_ENTITY
           
static int START_PREFIX_MAPPING
           
 
Constructor Summary
XMLExtendedCompiler()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          put your documentation comment here
 void comment(char[] ch, int start, int len)
          Report an XML comment anywhere in the document.
private  void debug(java.lang.String str)
           
 void endCDATA()
          Report the end of a CDATA section.
 void endDocument()
          put your documentation comment here
 void endDTD()
          Report the end of DTD declarations.
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
          put your documentation comment here
 void endEntity(java.lang.String name)
          Report the end of an entity.
 void endPrefixMapping(java.lang.String prefix)
          put your documentation comment here
private  void error(java.lang.String str)
           
 void ignorableWhitespace(char[] ch, int start, int length)
          put your documentation comment here
 void processingInstruction(java.lang.String target, java.lang.String data)
          put your documentation comment here
 void setDocumentLocator(org.xml.sax.Locator locator)
          put your documentation comment here
 void setOutputStream(java.io.OutputStream stream)
          set the OutputStream
 void skippedEntity(java.lang.String name)
          put your documentation comment here
 void startCDATA()
          Report the start of a CDATA section.
 void startDocument()
          put your documentation comment here
 void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
          Report the start of DTD declarations, if any.
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
          put your documentation comment here
 void startEntity(java.lang.String name)
          Report the beginning of an entity.
 void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
          put your documentation comment here
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

private CompiledXMLOutputStream out

element

private int element

START_DOCUMENT

public static final int START_DOCUMENT
See Also:
Constant Field Values

END_DOCUMENT

public static final int END_DOCUMENT
See Also:
Constant Field Values

START_PREFIX_MAPPING

public static final int START_PREFIX_MAPPING
See Also:
Constant Field Values

END_PREFIX_MAPPING

public static final int END_PREFIX_MAPPING
See Also:
Constant Field Values

START_ELEMENT

public static final int START_ELEMENT
See Also:
Constant Field Values

END_ELEMENT

public static final int END_ELEMENT
See Also:
Constant Field Values

CHARACTERS

public static final int CHARACTERS
See Also:
Constant Field Values

IGNORABLE_WHITESPACE

public static final int IGNORABLE_WHITESPACE
See Also:
Constant Field Values

PROCESSING_INSTRUCTION

public static final int PROCESSING_INSTRUCTION
See Also:
Constant Field Values

COMMENT

public static final int COMMENT
Lexical Events

See Also:
Constant Field Values

START_CDATA

public static final int START_CDATA
See Also:
Constant Field Values

END_CDATA

public static final int END_CDATA
See Also:
Constant Field Values

START_DTD

public static final int START_DTD
See Also:
Constant Field Values

END_DTD

public static final int END_DTD
See Also:
Constant Field Values

START_ENTITY

public static final int START_ENTITY
See Also:
Constant Field Values

END_ENTITY

public static final int END_ENTITY
See Also:
Constant Field Values
Constructor Detail

XMLExtendedCompiler

public XMLExtendedCompiler()
Method Detail

debug

private void debug(java.lang.String str)

error

private void error(java.lang.String str)

setOutputStream

public void setOutputStream(java.io.OutputStream stream)
                     throws java.io.IOException
set the OutputStream

Parameters:
stream -
Throws:
java.io.IOException

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
put your documentation comment here

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

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
put your documentation comment here

Specified by:
endDocument in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
                        throws org.xml.sax.SAXException
put your documentation comment here

Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler
Parameters:
prefix -
uri -
Throws:
org.xml.sax.SAXException

endPrefixMapping

public void endPrefixMapping(java.lang.String prefix)
                      throws org.xml.sax.SAXException
put your documentation comment here

Specified by:
endPrefixMapping in interface org.xml.sax.ContentHandler
Parameters:
prefix -
Throws:
org.xml.sax.SAXException

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
put your documentation comment here

Specified by:
startElement in interface org.xml.sax.ContentHandler
Parameters:
namespaceURI -
localName -
qName -
atts -
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
put your documentation comment here

Specified by:
endElement in interface org.xml.sax.ContentHandler
Parameters:
namespaceURI -
localName -
qName -
Throws:
org.xml.sax.SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
put your documentation comment here

Specified by:
characters in interface org.xml.sax.ContentHandler
Parameters:
ch -
start -
length -
Throws:
org.xml.sax.SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws org.xml.sax.SAXException
put your documentation comment here

Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler
Parameters:
ch -
start -
length -
Throws:
org.xml.sax.SAXException

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
put your documentation comment here

Specified by:
processingInstruction in interface org.xml.sax.ContentHandler
Parameters:
target -
data -
Throws:
org.xml.sax.SAXException

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
put your documentation comment here

Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler
Parameters:
locator -

skippedEntity

public void skippedEntity(java.lang.String name)
                   throws org.xml.sax.SAXException
put your documentation comment here

Specified by:
skippedEntity in interface org.xml.sax.ContentHandler
Parameters:
name -
Throws:
org.xml.sax.SAXException

startDTD

public void startDTD(java.lang.String name,
                     java.lang.String publicId,
                     java.lang.String systemId)
              throws org.xml.sax.SAXException
Report the start of DTD declarations, if any.

Specified by:
startDTD in interface org.xml.sax.ext.LexicalHandler
Parameters:
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

endDTD

public void endDTD()
            throws org.xml.sax.SAXException
Report the end of DTD declarations.

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

startEntity

public void startEntity(java.lang.String name)
                 throws org.xml.sax.SAXException
Report the beginning of an entity.

Specified by:
startEntity in interface org.xml.sax.ext.LexicalHandler
Parameters:
name - The name of the entity. If it is a parameter entity, the name will begin with '%'.
org.xml.sax.SAXException

endEntity

public void endEntity(java.lang.String name)
               throws org.xml.sax.SAXException
Report the end of an entity.

Specified by:
endEntity in interface org.xml.sax.ext.LexicalHandler
Parameters:
name - The name of the entity that is ending.
org.xml.sax.SAXException

startCDATA

public void startCDATA()
                throws org.xml.sax.SAXException
Report the start of a CDATA section.

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

endCDATA

public void endCDATA()
              throws org.xml.sax.SAXException
Report the end of a CDATA section.

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

comment

public void comment(char[] ch,
                    int start,
                    int len)
             throws org.xml.sax.SAXException
Report an XML comment anywhere in the document.

Specified by:
comment in interface org.xml.sax.ext.LexicalHandler
Parameters:
ch - An array holding the characters in the comment.
start - The starting position in the array.
len - The number of characters to use from the array.
org.xml.sax.SAXException


Copyright 2003 Bibop Research International. All Rights Reserved.