You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Ovidiu Predescu <ov...@cup.hp.com> on 2001/05/12 03:37:30 UTC

how to get the line number of the context node?

Hi,

With Saxon I can get the line number of the context node in the source
document using the saxon:line-number() function. Is there an
equivalent function for Xalan?

Thanks,
-- 
Ovidiu Predescu <ov...@cup.hp.com>
http://orion.nsr.hp.com/ (inside HP's firewall only)
http://www.geocities.com/SiliconValley/Monitor/7464/ (GNU, Emacs, other stuff)

RE: how to get the line number of the context node?

Posted by Brian Quinlan <Br...@ActiveState.com>.
Gary wrote:
> I can't see anywhere in the stree DOM implementation where the line
> number of a Node is retained for retrieval.  So, if it isn't stored in
> the first place, I'm not sure how we'd implement such a function in
> Xalan.

The line number of source nodes is not saved. I made a modification to
XalanSourceTreeContentHandler to keep a map of XalanNodes and line numbers.
It works reasonably nicely.


Re: how to get the line number of the context node?

Posted by Gary L Peskin <ga...@firstech.com>.
I can't see anywhere in the stree DOM implementation where the line
number of a Node is retained for retrieval.  So, if it isn't stored in
the first place, I'm not sure how we'd implement such a function in
Xalan.

Gary

Ovidiu Predescu wrote:
> 
> Hi,
> 
> With Saxon I can get the line number of the context node in the source
> document using the saxon:line-number() function. Is there an
> equivalent function for Xalan?
> 
> Thanks,
> --
> Ovidiu Predescu <ov...@cup.hp.com>
> http://orion.nsr.hp.com/ (inside HP's firewall only)
> http://www.geocities.com/SiliconValley/Monitor/7464/ (GNU, Emacs, other stuff)