W3C home > Mailing lists > Public > public-html@w3.org > February 2008

Re: several messages about serialising HTML and related subjects

From: Simon Pieters <simonp@opera.com>
Date: Fri, 29 Feb 2008 17:27:37 +0100
To: "Ian Hickson" <ian@hixie.ch>
Cc: public-html <public-html@w3.org>
Message-ID: <op.t7an0bq3idj3kv@hp-a0a83fcd39d2.palace.opera.no>

On Fri, 29 Feb 2008 03:23:03 +0100, Ian Hickson <ian@hixie.ch> wrote:

>> The spec says:
>>
>>    Other nodes types (e.g. Attr) cannot occur as children of elements.  
>> If
>>    they do, this algorithm must raise an INVALID_STATE_ERR exception.
>>
>> s/elements/elements or documents/ as the algorithm can be used for  
>> documents
>> as well.
>>
>> What about PIs? They can occur as children of elements or documents.
>
> How?

Same way as CDATA sections. :-) DOM Core doesn't allow CDATA sections or  
PIs in HTML documents, but Opera allows them and it's not clear to me it  
makes sense to ban them from the DOM in HTML. (I'm planning to do a  
rewrite of DOM Core that doesn't have unnecessary differences between HTML  
and XML.)


>> Consider the following document:
>>
>>    <h:p xmlns:h="http://www.w3.org/1999/xhtml"><x/></h:p>
>>
>> When getting innerHTML on the root element, should the serialization
>> declare the no namespace explicitly as in <x xmlns=""/>? (I think it
>> should because setting innerHTML will imply namespace declarations so it
>> might change meaning if you insert it somewhere else with innerHTML.)
>
> I've added this:
>
> | If any of the elements in the serialisation are in the null namespace,
> | the default namespace in scope for those elements must be explicitly
> | declared as the empty string.
>
> Is that ok?

Yes, thanks.

-- 
Simon Pieters
Opera Software
Received on Friday, 29 February 2008 16:28:05 GMT

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