W3C home > Mailing lists > Public > public-webapi@w3.org > February 2006

Re: [REX] Inserting comments?

From: Stephane Bortzmeyer <bortzmeyer@nic.fr>
Date: Fri, 10 Feb 2006 10:01:06 +0100
To: Robin Berjon <robin.berjon@expway.fr>
Cc: Stephane Bortzmeyer <bortzmeyer@nic.fr>, public-webapi@w3.org
Message-ID: <20060210090106.GB2218@nic.fr>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:53 GMT