jcs.xml
Class ServerEntityResolver
java.lang.Object
|
+--jcs.xml.ServerEntityResolver
- public class ServerEntityResolver
- extends java.lang.Object
- implements org.xml.sax.EntityResolver
A class to resolve external entity references for the XML parser.
This class is used internally by the JXml class.
It provides the mechanism for resolving entity references such as:
<!DOCTYPE ResultSet SYSTEM "ResultSet.dtd">
The parse method of the JXml class provides
an instance of this class to the XML parser, which invokes the
resolveEntity of that instance to resolve a reference
such as ResultSet.dtd.
The XML parser would normally resolve such a reference by looking for a file
named "ResultSet.dtd" in the "current" directory. But, when the XML parser
is called in the SQL server, it cannot access operating system files,
and therefore needs some other way to resolve external entity references.
This class is only used internally in the parse method
of the JXmlresolveExternal methods of JXml and subclasses
thereof.
|
Method Summary |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Returns the value for a given external ID. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ServerEntityResolver
public ServerEntityResolver(JXml thisJXmlDocArg)
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
throws org.xml.sax.SAXException
- Returns the value for a given external ID. This method is called
internally by the XML parser to resolve external entity references.
- Specified by:
- resolveEntity in interface org.xml.sax.EntityResolver
- Parameters:
publicId - a string that either is null, or is the value
specified as PUBLIC in an external
entity reference.systemId - a string that either is null, or is the value
specified as SYSTEM in an external
entity reference.- Returns:
- an InputSource containing the resolution of the external entity
denoted by the
publicId
and/or systemId values. - Throws:
- org.xml.sax.SAXException - Thown when the given external entity is not
resolvable, or when an IOException occurs
internally while constructing the
InputSource on the entity's resolution.