org.merlotxml.util.xml.xerces
Class DOMLiaison.MyEntityResolver

java.lang.Object
  extended byorg.merlotxml.util.xml.xerces.DOMLiaison.MyEntityResolver
All Implemented Interfaces:
org.xml.sax.EntityResolver
Enclosing class:
DOMLiaison

public class DOMLiaison.MyEntityResolver
extends java.lang.Object
implements org.xml.sax.EntityResolver


Constructor Summary
DOMLiaison.MyEntityResolver(ValidDocument doc)
           
 
Method Summary
 java.lang.String getSavedPublicId()
           
 java.lang.String getSavedSystemId()
           
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
          This entity resolver finds a dtd file on the filesystem if it can.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMLiaison.MyEntityResolver

public DOMLiaison.MyEntityResolver(ValidDocument doc)
Method Detail

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
                                      throws org.xml.sax.SAXException,
                                             java.io.IOException
This entity resolver finds a dtd file on the filesystem if it can. It does this by first checking the specified file (given as the systemId paramter which comes from the SYSTEM specifier in the XML <!DOCTYPE> definition. If the systemId isn't a full path or url to a valid file, then the resolver tries to find the file using the path.dtd resource from ResourceCatalog.

Specified by:
resolveEntity in interface org.xml.sax.EntityResolver
Parameters:
publicId - the public identifier for the entity
systemId - the system identifier (usually a filename or url) of the external entitiy.
Throws:
org.xml.sax.SAXException - this is thrown by the DTD parser during DTD parsing.
java.io.IOException - FileNotFound is the typical IOException thrown in the case that the external entity file can't be found. Other IOExceptions may be thrown depending on the external entity file operations.

getSavedPublicId

public java.lang.String getSavedPublicId()

getSavedSystemId

public java.lang.String getSavedSystemId()