I hope this is the right list to post this question.
to write in my xsl stylesheet that when it
matches some node to output some
stuff, that the xsl
will also print the line number that this node appears
the input file. I found the saxon function line-number(),
that seems to
be what I need, but when I use it,
I get -1 as a result for any node.
is mention on the saxon page that I may need to add -l option
on command line
when running to enable line numbers, but my problem
that I don't
really run my stylesheet using saxon, but using java with
to enable use of saxon functions along with some java extensions,
command line looks like this:
java -cp .;saxon.jar
org.apache.xalan.xslt.Process -in input.xml -xsl
instead of running through saxon directly:
-o output.xml input.xml stylesheet.xsl
How can I define saxon to return
valid line numbers?
Or maybe there is some other function that I can
Thank you very much for help.