- From: Thomas Broyer <t.broyer@gmail.com>
- Date: Mon, 10 Dec 2007 10:25:45 +0100
- To: public-html@w3.org
2007/12/10, Karl Dubost:
>
> Le 9 déc. 2007 à 17:03, j.j. a écrit :
> > CON
> > <xmp><![CDATA[ XHTML needs CDATA section. ]]></xmp>
>
> 1. that makes it more difficult to go from HTML to XHTML format to the
> other.
Agreed.
However, it should be supported at the parser level for backwards
compatibility (it already is).
> 3. You can't use xmp inside xmp
> <!DOCTYPE html>
> <html>
> <title>boo</title>
> <xmp> Using <xmp>html code</xmp> to show the source code</xmp>
> </html>
> Rendered view:
> Using <xmp>html code to show the source code
Not convinced.
Same as CDATA sections in XML:
<![CDATA[Using a <![CDATA[CDATA section]]> to show the source code]]>
Parsed as:
Using <[CDATA[CDATA section to show the source code ]]>
You'd have to write:
<xmp>Using <xmp>html code</</xmp>xmp<xmp>> to show the source code</xmp>
(and variations around those lines)
similar to the following in XML:
<![CDATA[Using a <![CDATA[CDATA section]]>]]><![CDATA[ to show the
source code]]>
That being said, I'm really not convinced that XMP is needed at all:
you only have to do a search/replace for & to & (you're already
doing it anyway) and < to < (other characters don't need any
special treatment).
That XMP be supported in the parser, yes, for backwards compatibility,
but made compliant ?!
(Regarding j.j.'s arguments: if XMP is given the same semantics as
<pre><code> (first of his arguments), then the following two arguments
don't apply, and vice versa; having an element with varying semantics
depending on the attributes used is IMO a Bad Thing; we already have
it with <a name=> vs. <a href=> and <a name=> is actually being
replaced with "any element with an id attribute")
--
Thomas Broyer
Received on Monday, 10 December 2007 09:26:00 UTC