开发者

How to get line number in XSLT?

开发者 https://www.devze.com 2023-04-10 12:45 出处:网络
Is it possible to get the line number when we apply XSLT to an XML? 开发者_如何学编程I need to know the line number when there is a particular template match found in the XML.

Is it possible to get the line number when we apply XSLT to an XML? 开发者_如何学编程I need to know the line number when there is a particular template match found in the XML.

Is it possible to retrieve the line number?


If you mean the line number of the node in the source document, Saxon provides this using an extension function saxon:line-number(), provided the source document is supplied via an interface (e.g. a SAX parser) that reports line numbers. There's no standard XSLT mechanism for this.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号