W3C home > Mailing lists > Public > xsl-editors@w3.org > January to March 2002

serializing nodes as text or as comment

From: Oliver Becker <obecker@informatik.hu-berlin.de>
Date: Wed, 30 Jan 2002 12:25:40 +0100 (MET)
Message-Id: <200201301125.g0UBPe906380@mail.informatik.hu-berlin.de>
To: xsl-editors@w3.org
Hi,

it would be fine if there's an easy to create comments like
<!-- Processing: <a>text</a><a>text</a> -->
Rationale: I would like to do some debugging and add parameter values
(which could be node-sets) to the output - ideally as comments.
Well, I could write my own serializer (templates which produce
angle brackets and tag names) but that's a bit overkill for my purpose.

If the XSLT processor would do the job
<xsl:comment><xsl:copy-of select="$set"/></xsl:comment>
that would be very simple and convenient.
The same with text nodes:
<xsl:text><xsl:copy-of select="$set"/></xsl:text>
could produce a text node with the serialized content of $set.

Well, I recognize that the responsibilities for the processor 
(dealing with nodes) and the serializer (producing output) would be mixed.
Just a thought ...

Cheers,
Oliver


/-------------------------------------------------------------------\
|  ob|do        Dipl.Inf. Oliver Becker                             |
|  --+--        E-Mail: obecker@informatik.hu-berlin.de             |
|  op|qo        WWW:    http://www.informatik.hu-berlin.de/~obecker |
\-------------------------------------------------------------------/
Received on Wednesday, 30 January 2002 06:25:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:52 GMT