org.merlotxml.util.xml
Interface ValidDOMLiaison

All Superinterfaces:
DOMLiaison
All Known Implementing Classes:
DOMLiaison

public interface ValidDOMLiaison
extends DOMLiaison

This interface provides means to access the DTD definitions as well as the DOM document

Author:
Kelly A. Campbell

Method Summary
 ValidDocument createValidDocument()
          Creates a new document that should maintain validity.
 ValidDocument parseValidXMLStream(java.io.InputStream is, java.lang.String fileLocation)
          This parses an XML stream using a validating parser and maintains references to the DTDDocuments used in it.
 void print(ValidDocument doc, java.io.Writer output, java.lang.String resultns, boolean pretty)
          Print that takes a valid document so it can print out the DTD specification properly.
 
Methods inherited from interface org.merlotxml.util.xml.DOMLiaison
addEntityResolver, createDocument, parseXMLStream, parseXMLStream, print, setProperties
 

Method Detail

createValidDocument

public ValidDocument createValidDocument()
Creates a new document that should maintain validity. NEW... not really used or implemented yet


parseValidXMLStream

public ValidDocument parseValidXMLStream(java.io.InputStream is,
                                         java.lang.String fileLocation)
                                  throws DOMLiaisonImplException
This parses an XML stream using a validating parser and maintains references to the DTDDocuments used in it. It returns a ValidatedDocument which contains a org.w3c.dom.Document and the DTDDocuments it uses.

Uses the default EntityResolver for resolving the DTD documents

Parameters:
is - InputStream to parse
fileLocation - optional URL for the file used to find relative DTD's
Returns:
com.channelpoint.commerce.util.xml.ValidatedDocument
Throws:
DOMLiaisonImplException - wrapper for exceptions thrown by the validating parser.

print

public void print(ValidDocument doc,
                  java.io.Writer output,
                  java.lang.String resultns,
                  boolean pretty)
           throws DOMLiaisonImplException
Print that takes a valid document so it can print out the DTD specification properly.

Throws:
DOMLiaisonImplException