xsl-list
[Top] [All Lists]

Re: [xsl] __LINE__ equivalent in XSTL

2011-12-02 06:43:21
Hello,

I needo to put a comment like this

(line 1234)  <xsl:comment>line 1234 X=<xsl:value-of select="X" />

then I write  the translated xml to a log and when i'll go to check it
in case of need I know

1) the line has been executed
2) the value of X at that line

Does this sound good?

now I'm wrinting 1234 by hand, but it would be great to have current
line automatically, like __LINE__ in C

Many thanks

Bye

Il giorno ven, 02/12/2011 alle 07.22 -0500, G. Ken Holman ha scritto:
At 2011-12-02 13:14 +0100, Bartolomeo Nicolotti wrote:
in C there's a pre-processor directive

__LINE__

that gives you the line of source where the directive is.

Is there an equivalent in XSLT?

No ... how were you planning to exploit this information in your 
transformation?  Perhaps there is something else to help you.

Remember that the input lines of all documents fed into the XSLT 
processor are not accessible to an XSLT transformation because the 
transformation works on XPath node trees interpreted from those sources.

The XSLT processor, itself, may keep track of input source lines, but 
this is an aspect of the processor and not of the W3C specification.

I hope this helps.

. . . . . . . . . Ken


--
Contact us for world-wide XML consulting and instructor-led training
Free 5-hour video lecture: XSLT/XPath 1.0 & 2.0 http://ude.my/t37DVX
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/s/
G. Ken Holman                   
mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--