RE: [xsl] debugging source line numbers

Subject: RE: [xsl] debugging source line numbers
From: "Roger Glover" <glover_roger@xxxxxxxxx>
Date: Wed, 22 Jan 2003 00:23:00 -0600
Dimitre Novatchev wrote:
> In case preserving of whitespace-only nodes has not been turned off and
> the xml source has "a single tag with all attributs/namespace
> definitions" on a single line, then the following gives the exact line
> number:
>
> count(preceding::text()[contains(., '&#xA;')]) + 1

This counts text nodes, not line feeds.  If a text node has more than one
line feed it will still only count as one text node in the final result.

I think it is on the right track, but it does not quite work as currently
written.

-- Roger Glover
   glover_roger@xxxxxxxxx



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread