xsl-list
[Top] [All Lists]

RE: debugging source line numbers

2003-01-21 23:23:00
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(., '
')]) + 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(_at_)yahoo(_dot_)com



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



<Prev in Thread] Current Thread [Next in Thread>