org.exolab.castor.util

Class DTDResolver

Implemented Interfaces:
EntityResolver

public class DTDResolver
extends java.lang.Object
implements EntityResolver

Entity resolver for various DTD/schema. Holds information and performs resolving on a variety of DTD and schema, both those defined by Castor and those used by Castor and cached by it.

The following DTD and XML schema are supported:

Thie resolver can resolve both public and system identifiers, and will return an input stream into a cached resource in the Castor JAR.

This resolver can be used as wrapper to another entity resolver. For example, if a resolver is used for external entities in the mapping file, construct a new resolver using the DTDResolver(EntityResolver) constructor.

Version:
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:04 $
Author:
Assaf Arkin

Nested Class Summary

(package private) static class
DTDResolver.DTDInfo
Holds information about a given DTD of XML Schema.

Constructor Summary

DTDResolver()
Constructs a new DTD resolver.
DTDResolver(EntityResolver resolver)
Constructs a new DTD resolver.

Method Summary

URL
getBaseURL()
InputSource
resolveEntity(String publicId, String systemId)
void
setBaseURL(URL baseUrl)

Constructor Details

DTDResolver

public DTDResolver()
Constructs a new DTD resolver.

DTDResolver

public DTDResolver(EntityResolver resolver)
Constructs a new DTD resolver. This resolver wraps another resolver and will delegate all resolving not related to the Castor mapping files to that resolver. The wrapper resolver will typically be used for entities appearing in the actual mapping file.

Method Details

getBaseURL

public URL getBaseURL()

resolveEntity

public InputSource resolveEntity(String publicId,
                                 String systemId)
            throws IOException,
                   SAXException

setBaseURL

public void setBaseURL(URL baseUrl)

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com