saxon:line-numbering

This attribute may be set on the xsl:source-document instruction to enable line numbering and column numbering for the document being read. The permitted values are: yes|true|1 or no|false|0.

If line and column numbering is enabled for a document, the line and column number of an element node in the document can be obtained using the extension functions saxon:line-number and saxon:column-number respectively.

Line numbering of source documents can also be enabled using the configuration property LINE_NUMBERING or the command-line option -l (letter ell).

In the case of an XML parser that follows the SAX specification, the line and column number reported for an element represent the position of the ">" character at the end of the start tag.