3 //=============================================================================
7 * @author Nanbor Wang <nanbor@cs.wustl.edu>
9 //=============================================================================
11 #ifndef _ACEXML_LOCATOR_H_
12 #define _ACEXML_LOCATOR_H_
13 #include /**/ "ace/pre.h"
15 #include "ACEXML/common/ACEXML_Export.h"
16 #include "ACEXML/common/XML_Types.h"
19 * @class ACEXML_Locator
21 * @brief ACEXML_Locator defines operations that an XML locator should support.
23 * If a SAX parser provides location information to the SAX
24 * application, it does so by implementing this interface and then
25 * passing an instance to the application using the content handler's
26 * setDocumentLocator method. The application can use the object to
27 * obtain the location of any other content handler event in the XML
30 * Note that the results returned by the object will be valid only
31 * during the scope of each content handler method: the application
32 * will receive unpredictable results if it attempts to use the
33 * locator at any other time.
35 * SAX parsers are not required to supply a locator, but they are very
36 * strongly encouraged to do so. If the parser supplies a locator, it
37 * must do so before reporting any other document events. If no
38 * locator has been set by the time the application receives the
39 * startDocument event, the application should assume that a locator
42 class ACEXML_Export ACEXML_Locator
45 virtual ~ACEXML_Locator ();
48 * Return the column number where the current document event ends.
50 virtual int getColumnNumber () const = 0;
53 * Return the line number where the current document event ends.
55 virtual int getLineNumber () const = 0;
58 * Return the public identifier for the current document event.
60 virtual const ACEXML_Char
*getPublicId () const = 0;
63 * Return the system identifier for the current document event.
65 virtual const ACEXML_Char
*getSystemId () const = 0;
69 #include /**/ "ace/post.h"
71 #endif /* _ACEXML_LOCATOR_H_ */