org.apache.fop.render.afp.tools

Class DTDEntityResolver

Implemented Interfaces:
EntityResolver

public class DTDEntityResolver
extends java.lang.Object
implements EntityResolver

An entity resolver for both DOM and SAX models of the SAX document.

The entity resolver only handles queries for the DTD. It will find any URI with a recognised public id and return an org.xml.sax.InputSource.

Author:
Joe Schmetzer

Field Summary

static String
AFP_DTD_1_0_ID
Public ID for the AFP fonts 1.0 DTD.
static String
AFP_DTD_1_0_RESOURCE
Resource location for the AFP fonts 1.0 DTD.
static String
AFP_DTD_1_1_ID
Public ID for the AFP fonts 1.1 DTD.
static String
AFP_DTD_1_1_RESOURCE
Resource location for the AFP fonts 1.1 DTD.
static String
AFP_DTD_1_2_ID
Public ID for the AFP fonts 1.2 DTD.
static String
AFP_DTD_1_2_RESOURCE
Resource location for the AFP fonts 1.2 DTD.

Method Summary

InputSource
resolveEntity(String publicId, String systemId)
Resolve the combination of system and public identifiers.

Field Details

AFP_DTD_1_0_ID

public static final String AFP_DTD_1_0_ID
Public ID for the AFP fonts 1.0 DTD.

AFP_DTD_1_0_RESOURCE

public static final String AFP_DTD_1_0_RESOURCE
Resource location for the AFP fonts 1.0 DTD.

AFP_DTD_1_1_ID

public static final String AFP_DTD_1_1_ID
Public ID for the AFP fonts 1.1 DTD.

AFP_DTD_1_1_RESOURCE

public static final String AFP_DTD_1_1_RESOURCE
Resource location for the AFP fonts 1.1 DTD.

AFP_DTD_1_2_ID

public static final String AFP_DTD_1_2_ID
Public ID for the AFP fonts 1.2 DTD.

AFP_DTD_1_2_RESOURCE

public static final String AFP_DTD_1_2_RESOURCE
Resource location for the AFP fonts 1.2 DTD.

Method Details

resolveEntity

public InputSource resolveEntity(String publicId,
                                 String systemId)
            throws IOException
Resolve the combination of system and public identifiers. If this resolver recognises the publicId, it will handle the resolution from the classpath, otherwise it will return null and allow the default resolution to occur.
Parameters:
publicId - the public identifier to use
systemId - the system identifier to resolve
Returns:
An input source to the entity or null if not handled

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.