serializing nodes as text or as comment

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 UTC