Aleksander Slominski wrote:
> this is a simple patch that adds to Xerces2 XNI ability to track absolute
> positioning in parsed entities (besides column and row numbers). i have
> added new method public int getCurrentEntityAbsoluteOffset(); to
> XMLLocator and enhanced XMLEntityManager load(...) to keep track of
> consumed data so absolute offset can be calculated.

Without direct hooks into the decoder used to transcode the
source bytes into the Unicode characters that the parser scans, 
the parser cannot know the absolute byte location in the stream. 
And, as I said before, writing a stream that only reads one 
character at a time might work but is very inefficient.

The code that you submitted does not provide the application 
with a mapping from the absolute byte position that corresponds 
to handler callbacks. It only provides a mapping from the char
position within the buffer holding the transcoded characters.
If this is what you want to accomplish, that's fine but we would 
still need a feature that tells the scanner not to re-use the 
input buffers (something we do for performance).

-- 
Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED]

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

Reply via email to