APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.util

public Class LocatorProxy

extends Object
implements Locator2
Class Inheritance
All Implemented Interfaces
org.xml.sax.ext.Locator2, org.xml.sax.Locator
Imports
com.sun.org.apache.xerces.internal.xni.XMLLocator, org.xml.sax.Locator, org.xml.sax.ext.Locator2

Wraps XMLLocator and make it look like a SAX Locator.
Authors
Arnaud Le Hors, IBM, Andy Clark, IBM

Field Summary

Modifier and TypeField and Description
private final XMLLocator
fLocator

XML locator.

Constructor Summary

AccessConstructor and Description
public
LocatorProxy(XMLLocator locator)

Constructs an XML locator proxy.

Method Summary

Modifier and TypeMethod and Description
public int
public String
getEncoding()

Implements org.xml.sax.ext.Locator2.getEncoding.

Returns the name of the character encoding for the entity.

public int
public String
getPublicId()

Implements org.xml.sax.Locator.getPublicId.

Public identifier.

public String
getSystemId()

Implements org.xml.sax.Locator.getSystemId.

System identifier.

public String
getXMLVersion()

Implements org.xml.sax.ext.Locator2.getXMLVersion.

Returns the version of XML used for the entity.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fLocatorback to summary
private final XMLLocator fLocator

XML locator.

Constructor Detail

LocatorProxyback to summary
public LocatorProxy(XMLLocator locator)

Constructs an XML locator proxy.

Method Detail

getColumnNumberback to summary
public int getColumnNumber()

Implements org.xml.sax.Locator.getColumnNumber.

Column number.

getEncodingback to summary
public String getEncoding()

Implements org.xml.sax.ext.Locator2.getEncoding.

Doc from org.xml.sax.ext.Locator2.getEncoding.

Returns the name of the character encoding for the entity. If the encoding was declared externally (for example, in a MIME Content-Type header), that will be the name returned. Else if there was an <?xml ...encoding='...'?> declaration at the start of the document, that encoding name will be returned. Otherwise the encoding will been inferred (normally to be UTF-8, or some UTF-16 variant), and that inferred name will be returned.

When an InputSource is used to provide an entity's character stream, this method returns the encoding provided in that input stream.

Note that some recent W3C specifications require that text in some encodings be normalized, using Unicode Normalization Form C, before processing. Such normalization must be performed by applications, and would normally be triggered based on the value returned by this method.

Encoding names may be those used by the underlying JVM, and comparisons should be case-insensitive.

getLineNumberback to summary
public int getLineNumber()

Implements org.xml.sax.Locator.getLineNumber.

Line number.

getPublicIdback to summary
public String getPublicId()

Implements org.xml.sax.Locator.getPublicId.

Public identifier.

getSystemIdback to summary
public String getSystemId()

Implements org.xml.sax.Locator.getSystemId.

System identifier.

getXMLVersionback to summary
public String getXMLVersion()

Implements org.xml.sax.ext.Locator2.getXMLVersion.

Doc from org.xml.sax.ext.Locator2.getXMLVersion.

Returns the version of XML used for the entity. This will normally be the identifier from the current entity's <?xml version='...' ...?> declaration, or be defaulted by the parser.