|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.util.SchemaResolver
public class SchemaResolver
This class implements a local SAX's EntityResolver
. All
DTDs and schemas used to validate the web.xml file will re-directed
to a local file stored in the servlet-api.jar and jsp-api.jar.
Field Summary | |
---|---|
protected Digester |
digester
The disgester instance for which this class is the entity resolver. |
protected java.util.HashMap |
entityValidator
The URLs of dtds and schemas that have been registered, keyed by the public identifier that corresponds. |
protected java.lang.String |
publicId
The public identifier of the DTD we are currently parsing under (if any). |
protected java.lang.String |
schemaExtension
Extension to make the difference between DTD and Schema. |
Constructor Summary | |
---|---|
SchemaResolver(Digester digester)
Create a new EntityResolver that will redirect
all remote dtds and schema to a locat destination. |
Method Summary | |
---|---|
void |
register(java.lang.String publicId,
java.lang.String entityURL)
Register the specified DTD/Schema URL for the specified public identifier. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Resolve the requested external entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Digester digester
protected java.util.HashMap entityValidator
protected java.lang.String publicId
protected java.lang.String schemaExtension
Constructor Detail |
---|
public SchemaResolver(Digester digester)
EntityResolver
that will redirect
all remote dtds and schema to a locat destination.
digester
- The digester instance.Method Detail |
---|
public void register(java.lang.String publicId, java.lang.String entityURL)
parse()
.
When adding a schema file (*.xsd), only the name of the file
will get added. If two schemas with the same name are added,
only the last one will be stored.
publicId
- Public identifier of the DTD to be resolvedentityURL
- The URL to use for reading this DTDpublic org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
resolveEntity
in interface org.xml.sax.EntityResolver
publicId
- The public identifier of the entity being referencedsystemId
- The system identifier of the entity being referenced
org.xml.sax.SAXException
- if a parsing exception occurs
|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |