Subject: XSLT - xml difference with line number
Posted By: mrame Post Date: 6/4/2008 5:42:50 PM
Hi All,
Im working with documentation in xml. i need to find the difference in xml files line by lines. for that i need a line by line error report.
 I could find if there is any difference. but i cant find the line of the actual error-occurrence.

regards,
ramesh
Reply By: mhkay Reply Date: 6/4/2008 5:49:57 PM
There's nothing in standard XSLT that will give you the line number of a node in the source tree (it's not part of the data model). There's an extension in Saxon (saxon:line-number()) that works provided that you say you want line numbers maintained when you build the source tree. I don't know of similar extensions in other products.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference

Go to topic 71879

Return to index page 1