Serializing PIs in HTML (detailed review of Serializing HTML fragments)

(This is part of my detailed review of the Serialising HTML fragments  
section.)

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.  
Wouldn't it be nicer to drop them on the floor or maybe emit them as "<?"  
+ target + " " + data + ">" (even though that wouldn't be conforming  
HTML5) instead of raising an exception?

-- 
Simon Pieters
Opera Software

Received on Wednesday, 15 August 2007 12:49:29 UTC