Public Reference
Use a public
entry instead of a system
entry to find a desired resource.
If no system
entry matches the desired resource, and the PREFER
property is specified to match public
, then a public
entry can do the same as a system
entry. Note that public
is the default setting for the PREFER
property.
Using a Public Entry
When the DTD reference in the parsed XML file contains a public identifier such as "-//OPENJDK//XML CATALOG DTD//1.0"
, a public
entry can be written as follows in the catalog entry file:
<public publicId="-//OPENJDK//XML CATALOG DTD//1.0" uri="example.dtd"/>
When you create and use a CatalogResolver
object with this entry file, the example.dtd
resolves through the publicId
property. See System Reference for an example of creating a CatalogResolver
object.