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

#include <ISAXLocator.h>

Inheritance diagram for ISAXLocator:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISAXLOCATOR }
 

Public Member Functions

virtual void Adopt (const AXE8_Parser parser, ISAXServices *owner)=0
 
virtual bool16 GetPublicId (WideString &s) const =0
 
virtual bool16 GetSystemId (WideString &s) const =0
 
virtual int32 GetLineNumber () const =0
 
virtual int32 GetColumnNumber () const =0
 
virtual void setPublicID (const WideString &s)=0
 
virtual void setSystemID (const WideString &s)=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

Interface for associating a SAX event with a document location.

If a SAX parser provides location information to the SAX application, it does so by implementing this interface and passing an instance to the application using the ISAXContentHandler's SetDocumentLocator method. The application can use the object to obtain the location of any other document handler event in the XML source document.

Note that the results returned by the object will be valid only during the scope of each content handler method: the application will receive unpredictable results if it attempts to use the locator at any other time.

The locator object is provided before reporting any other document events (

See Also
ISAXContentHandler). If no locator has been set by the time the application receives the startDocument event, the application should assume that a locator is not available.
ISAXContentHandler::SetDocumentLocator

Member Function Documentation

virtual void ISAXLocator::Adopt (const AXE8_Parser parser,
ISAXServicesowner 
)
pure virtual

Adopt an instance of a CAXELocator class provided by the parser. This is not intended to by used by clients.

virtual int32 ISAXLocator::GetColumnNumber () const
pure virtual

Column number where the current document event ends.

Note that this is the column number of the first character after the text associated with the document event. The first column in a line is position 1.

Returns
The column number, or -1 if none is available.
See Also
GetLineNumber
virtual int32 ISAXLocator::GetLineNumber () const
pure virtual

Line number where the current document event ends

Note that this is the line position of the first character after the text associated with the document event.

Returns
The line number, or -1 if none is available.
See Also
GetColumnNumber
virtual bool16 ISAXLocator::GetPublicId (WideStrings) const
pure virtual

Public identifier for the current document event

Parameters
sSet to the public identifier or left unchanged if kFalse is returned.
Returns
kTrue if a public identifier is defined, kFalse otherwise.
See Also
GetSystemId
virtual bool16 ISAXLocator::GetSystemId (WideStrings) const
pure virtual

System identifier for the current document event

If the system identifier is a URL, the parser must resolve it fully before passing it to the application.

Parameters
sSet to the system identifier or left unchanged if kFalse is returned.
Returns
kTrue if a system identifier is defined, kFalse otherwise.
See Also
GetPublicId