com.lotus.xsl.xml4j2dom
Class XML4JLiaison4dom

java.lang.Object
  |
  +--com.lotus.xsl.XMLParserLiaisonDefault
        |
        +--com.lotus.xsl.xml4j2dom.XML4JLiaison4dom

public class XML4JLiaison4dom
extends XMLParserLiaisonDefault

A class that handles interfacing IBM's XML4J2 to the Lotus XSL Processor.


Inner Class Summary
 class XML4JLiaison4dom.DefaultErrorHandler
          Implement SAX error handler for default reporting.
 
Field Summary
static java.lang.String XML4J_VERSION
           
 
Fields inherited from class com.lotus.xsl.XMLParserLiaisonDefault
m_attrSpecialChars, m_formatterListener, m_processor, m_use_validation, S_XMLNAMESPACEURI
 
Constructor Summary
XML4JLiaison4dom()
          Construct an instance.
XML4JLiaison4dom(org.xml.sax.ErrorHandler errorHandler)
          Constructor that takes SAX ErrorHandler as an argument.
 
Method Summary
 void checkXML4JVersion()
          Check the XML4J version number
 com.lotus.xsl.xml4j2dom.Document createDocument()
          Create an empty DOM Document.
 com.lotus.xsl.xml4j2dom.Element getElementByID(java.lang.String id, com.lotus.xsl.xml4j2dom.Document doc)
          Given an ID, return the element.
 java.lang.String getNamespaceOfNode(com.lotus.xsl.xml4j2dom.Node n)
          Override getNamespaceOfNode and make namespaces not work with them, since the DOM (and the XML4J DOM) is broken in regards to getting the parent of an attribute.
 com.lotus.xsl.xml4j2dom.Node getParentOfNode(com.lotus.xsl.xml4j2dom.Node node)
          Get the parent of a node.
 java.lang.String getParserDescription()
          Return a string suitible for telling the user what parser is being used.
 boolean isIgnorableWhitespace(com.lotus.xsl.xml4j2dom.Text node)
          Tell if the node is ignorable whitespace.
static void main(java.lang.String[] argv)
          Command line interfact to transform the XML according to the instructions found in the XSL document.
 com.lotus.xsl.xml4j2dom.Document parseXMLStream(java.io.Reader reader, java.lang.String filename)
          Parse the text pointed at by the reader as XML, and return a DOM Document interface.
 
Methods inherited from class com.lotus.xsl.XMLParserLiaisonDefault
getElementByID, getExpandedAttributeName, getExpandedElementName, getFormatterListener, getIndent, getLocalNameOfNode, getNamespaceForPrefix, getNamespaceOfNode, getParentOfNode, getShouldExpandEntityRefs, getSpecialCharacters, getUseValidation, isIgnorableWhitespace, parseXMLStream, parseXMLStream, setFormatterListener, setFormatterListener, setIndent, setProcessorOwner, SetShouldExpandEntityRefs, setSpecialCharacters, setUseValidation, toMarkup
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML4J_VERSION

public static final java.lang.String XML4J_VERSION
Constructor Detail

XML4JLiaison4dom

public XML4JLiaison4dom(org.xml.sax.ErrorHandler errorHandler)
Constructor that takes SAX ErrorHandler as an argument. The error handler is registered with the XML Parser. Any XML-related errors will be reported to the calling application using this error handler.
Parameters:
errorHandler - SAX ErrorHandler instance.

XML4JLiaison4dom

public XML4JLiaison4dom()
Construct an instance.
Method Detail

getParserDescription

public java.lang.String getParserDescription()
Return a string suitible for telling the user what parser is being used.
Overrides:
getParserDescription in class XMLParserLiaisonDefault

checkXML4JVersion

public void checkXML4JVersion()
                       throws XSLProcessorException
Check the XML4J version number

parseXMLStream

public com.lotus.xsl.xml4j2dom.Document parseXMLStream(java.io.Reader reader,
                                                       java.lang.String filename)
                                                throws java.io.IOException,
                                                       XSLProcessorException
Parse the text pointed at by the reader as XML, and return a DOM Document interface. Implementation of XMLParserLiaison interface method.
Overrides:
parseXMLStream in class XMLParserLiaisonDefault

createDocument

public com.lotus.xsl.xml4j2dom.Document createDocument()
Create an empty DOM Document. Mainly used for creating an output document. Implementation of XMLParserLiaison interface method.
Overrides:
createDocument in class XMLParserLiaisonDefault

getElementByID

public com.lotus.xsl.xml4j2dom.Element getElementByID(java.lang.String id,
                                                      com.lotus.xsl.xml4j2dom.Document doc)
Given an ID, return the element.

isIgnorableWhitespace

public boolean isIgnorableWhitespace(com.lotus.xsl.xml4j2dom.Text node)
Tell if the node is ignorable whitespace.

getNamespaceOfNode

public java.lang.String getNamespaceOfNode(com.lotus.xsl.xml4j2dom.Node n)
Override getNamespaceOfNode and make namespaces not work with them, since the DOM (and the XML4J DOM) is broken in regards to getting the parent of an attribute.

getParentOfNode

public com.lotus.xsl.xml4j2dom.Node getParentOfNode(com.lotus.xsl.xml4j2dom.Node node)
                                             throws java.lang.RuntimeException
Get the parent of a node.

main

public static void main(java.lang.String[] argv)
Command line interfact to transform the XML according to the instructions found in the XSL document.