W3C home > Mailing lists > Public > www-html@w3.org > March 2005

Re: Neutral tags (like meta inside body).

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Mon, 21 Mar 2005 09:54:55 +0100
Message-ID: <423E8BDF.8060604@disruptive-innovations.com>
To: www-html@w3.org

Matt C. wrote:

> Hi Miguel.  We do something very similar with the applications I work on.
> We use HTML comments to section out content we want to parse for one thing
> or another...
> 
> <!-- start content section -->
> Blah Blah Blah
> <!-- End content section -->
> 
> This is an easy, and completely valid way to section off content to be
> used by external applications looking at your code.

That's the "paired PIs" or "paired comments" solution. There's another
solution, quite common in the SGML world, involving one only PI (or comment)
<?bbva index="yes|no"?> : when the parser encounters such a PI/comment,
the subtree the parent element is the root of becomes indexable or not
indexable. That allows very simple non-indexable areas inside indexable
subtrees. Otherwise, if you have to keep track of paired PIs/comments, it
becomes rapidly awful.

Of course, such a PI/comment is often inserted as first child of its parent.
Simplicity helps.

Pros : simpler, one extra node only, easier to maintain, easier to edit through
        UI
Cons: cannot make an arbitrary fragment indexable, must be a subtree

</Daniel>
Received on Monday, 21 March 2005 08:55:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:02 GMT