[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Reporting line numbers


Subject: RE: [xsl] Reporting line numbers
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 26 Oct 2005 19:12:22 +0100

Saxon has an extension saxon:line-number() but there's nothing in the
standard language.

For saxon:line-number() to work you need to specify an option when building
the source document: on the command line it's -l (letter ell)

Michael Kay
Saxonica 

> -----Original Message-----
> From: Dunn, Mark [mailto:mark.dunn@xxxxxxx] 
> Sent: 26 October 2005 09:32
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Reporting line numbers
> 
> Hello,
> 
> Is XSLT (1 or 2) able to tell me the line number in a file at which a
> node is found? For example, is there some code that could fill in the
> gap here:
> 
> <xsl:for-each select="myTag[@myAtt]">
> <!-- code to report the line number of each <myTag> element with the
> myAtt attribute -->
> </xsl:for-each>
> 
> Thanks for any suggestions,
> 
> Mark Dunn


Current Thread
Keywords