Re: [REX] Inserting comments?

On Thu, Feb 09, 2006 at 07:01:31PM +0100,
 Robin Berjon <robin.berjon@expway.fr> wrote 
 a message of 28 lines which said:

> No, actually, if the target DOM supports comments, then this comment
> will in fact be inserted into the target document. 

This is not obvious at all. And I believe that REX patches like:

<!-- This comment is in the REX source file only -->
<event target='/some/where' name='DOMNodeInserted'>
  <!-- This comment will be inserted in the target -->
</event>

are quite confusing.

> Is there any part of the specification which makes you believe that
> it would not

I agree with Ian Hickson, it seems to me that general XML rules (not
REX or DOM specific) would prevent it to be inserted. When I write a
XSLT template:

<xsl:template match="foo/bar">
   <xsl:comment>This one will be added as a comment in the
   output.</xsl:comment>
   <!-- This one is a real comment, it will be ignored -->
</xsl:template>

The "real" comment (between <!-- and -->) is not inserted.

Received on Friday, 10 February 2006 09:01:13 UTC