Hi Raj,

The locator in Xerces is actually the scanner. It always points to the 
scanner's position in the stream. This is consistent with SAX says which 
says that the column [1] and line [2] numbers reported by the locator 
correspond to the position where "the current document event ends". 
There's no way to configure the parser so that the Locator points 
elsewhere.

[1] 
http://www.saxproject.org/apidoc/org/xml/sax/Locator.html#getColumnNumber()
[2] 
http://www.saxproject.org/apidoc/org/xml/sax/Locator.html#getLineNumber()

Ritu Raj Tiwari <[EMAIL PROTECTED]> wrote on 02/25/2005 05:03:54 
PM:

> When startElement() is called on my Handler, the
> document locator does not actually point to the start
> of the element, but to the position *past* the element
> start. E.g. consider the following XML fragment:
> 
> <tag attrib1="value1" attrib2="value2>
> .
> .
> .
> </tag>
> 
> In 
> <tag attrib1="value1" attrib2="value2>
> ^                                     ^
> Expected locator                      Actual locator
> 
> The actual locator at statElement() is one column past
> the end of element start. Is there a way to get the
> locator to point to the real start of the element?
> 
> Thanks.
> -Raj
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to