InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ISAXEntityResolver Class Referenceabstract

#include <ISAXEntityResolver.h>

Inheritance diagram for ISAXEntityResolver:
IPMUnknownCPMUnknown< ISAXEntityResolver >XCatHndEntityResolver

Public Types

enum  { kDefaultIID = IID_ISAXENTITYRESOLVER }
 

Public Member Functions

virtual IPMStreamResolveEntity (const WideString &publicID, const WideString &systemID)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Basic interface for resolving entities

If a SAX client requires validation with external DTDs, or if the client needs to implement customized handling for external entities, it must implement this interface and register an instance with the SAX parser using the parser's setEntityResolver method.

The parser will then allow the application to intercept any external entities (including the external DTD subset and external parameter entities, if any) before including them.

SAX clients that do not require validation need not implement nor register this handler.

The client can also use this interface to redirect system identifiers to local URIs or to look up replacements in a catalog (possibly by using the public identifier).

Member Function Documentation

virtual IPMStream* ISAXEntityResolver::ResolveEntity (const WideStringpublicID,
const WideStringsystemID 
)
pure virtual

Resolve entity

The parser will call this method before opening any external entity (including the external DTD subset, external entities referenced within the DTD, and external entities referenced within the document element).

Application writers can use this method to redirect external system identifiers to secure and/or local URIs, to look up public identifiers in a catalogue, or to read an entity from a file or database.

Parameters
publicIDThe public identifier of the external entity being referenced. The string will be invalid if no identifier was supplied.
systemIDThe system identifier of the external entity being referenced.
Returns
A client implemented input stream to the new input source. The client should return NULL if it does not know how to resolve the entity. This will result in a parser error being generated. The stream will be owned by the parsing system.
See Also
IPMStream

Implemented in XCatHndEntityResolver.