W3C home > Mailing lists > Public > public-html@w3.org > September 2010

Re: Request for Volunteers: Polyglot spec

From: Eliot Graff <eliotgra@microsoft.com>
Date: Sat, 4 Sep 2010 00:39:03 +0000
To: "public-html@w3.org" <public-html@w3.org>
Message-ID: <CE3A5BFD1228D84A8D9C158EEC195FD50EB91198@TK5EX14MBXW602.wingroup.windeploy.ntdev.microsoft.com>
>> If DOMs aren't important, only rendering is, I assume that this
>> document won't qualify:
>>
>> <html xmlns="http://www.w3.org/1999/xhtml">
>> <head>
>> <style> tbody { background: green } </style>
>> <title>example document</title>
>> </head>
>> <body>
>> Integer values for true/false.
>> <table>
>> <tr><td>true</td><td>1</td></tr>
>> <tr><td>false</td><td>0</td></tr>
>> </table>
>> </body>
>> </html>
>
> This one would also render differently:
>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head><title>example document</title></head>
> <body>
> <pre>
> Arbitrary example text</pre>
> </body>
> </html>
>
> and this one will also cause data corruption depending on the content-type:
>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head><title>example document</title></head>
> <body>
> <form>
> Edit your comment:
> <textarea name="comment">
> Your previous text</textarea>
> </form>
> </body>
> </html>
>
> (because the text/html parser strips a leading newline character in
> pre/textarea/listing elements), which seem like more serious issues than
> the <tbody>, since (unless I'm missing something) it's impossible to
> safely use these elements in polyglot documents, unless you do
>
> <pre><!---->
> text
> </pre>
>
> which is a horrid hack and won't work for textarea anyway. So I think a
> true polyglot subset would have to exclude the textarea element, which
> limits its usefulness further. (Maybe the remaining subset is still
> large enough to be worth specifying in detail.)


In response to bug 9684, I added sections 6.4 and 6.4.1 to the Polyglot spec:

6.4 Elements with Special Considerations
The following elements or their considerations require exceptions to the
general rules for polyglot markup.

6.4.1 White Space in <textarea> and <pre> Elements
Within polyglot markup, the text within either a <textarea> or <pre> element
must not begin with white space.

Thanks,

Eliot
Received on Saturday, 4 September 2010 00:39:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:17:14 GMT