34
35
36 /**
37 * SAX2 extension to augment the entity information provided
38 * though a {@link Locator}.
39 * If an implementation supports this extension, the Locator
40 * provided in {@link org.xml.sax.ContentHandler#setDocumentLocator
41 * ContentHandler.setDocumentLocator() } will implement this
42 * interface, and the
43 * <em>http://xml.org/sax/features/use-locator2</em> feature
44 * flag will have the value <em>true</em>.
45 *
46 * <blockquote>
47 * <em>This module, both source code and documentation, is in the
48 * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
49 * </blockquote>
50 *
51 * <p> XMLReader implementations are not required to support this
52 * information, and it is not part of core-only SAX2 distributions.</p>
53 *
54 * @since SAX 2.0 (extensions 1.1 alpha)
55 * @author David Brownell
56 */
57 public interface Locator2 extends Locator
58 {
59 /**
60 * Returns the version of XML used for the entity. This will
61 * normally be the identifier from the current entity's
62 * <em><?xml version='...' ...?></em> declaration,
63 * or be defaulted by the parser.
64 *
65 * @return Identifier for the XML version being used to interpret
66 * the entity's text, or null if that information is not yet
67 * available in the current parsing state.
68 */
69 public String getXMLVersion ();
70
71 /**
72 * Returns the name of the character encoding for the entity.
73 * If the encoding was declared externally (for example, in a MIME
74 * Content-Type header), that will be the name returned. Else if there
|
34
35
36 /**
37 * SAX2 extension to augment the entity information provided
38 * though a {@link Locator}.
39 * If an implementation supports this extension, the Locator
40 * provided in {@link org.xml.sax.ContentHandler#setDocumentLocator
41 * ContentHandler.setDocumentLocator() } will implement this
42 * interface, and the
43 * <em>http://xml.org/sax/features/use-locator2</em> feature
44 * flag will have the value <em>true</em>.
45 *
46 * <blockquote>
47 * <em>This module, both source code and documentation, is in the
48 * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
49 * </blockquote>
50 *
51 * <p> XMLReader implementations are not required to support this
52 * information, and it is not part of core-only SAX2 distributions.</p>
53 *
54 * @since 1.5, SAX 2.0 (extensions 1.1 alpha)
55 * @author David Brownell
56 */
57 public interface Locator2 extends Locator
58 {
59 /**
60 * Returns the version of XML used for the entity. This will
61 * normally be the identifier from the current entity's
62 * <em><?xml version='...' ...?></em> declaration,
63 * or be defaulted by the parser.
64 *
65 * @return Identifier for the XML version being used to interpret
66 * the entity's text, or null if that information is not yet
67 * available in the current parsing state.
68 */
69 public String getXMLVersion ();
70
71 /**
72 * Returns the name of the character encoding for the entity.
73 * If the encoding was declared externally (for example, in a MIME
74 * Content-Type header), that will be the name returned. Else if there
|