开发者

How to get line number in XSLT?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜