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

Change proposal for ISSUE-103

From: Ian Hickson <ian@hixie.ch>
Date: Sun, 6 Jun 2010 01:12:49 +0000 (UTC)
To: public-html@w3.org
Message-ID: <Pine.LNX.4.64.1006060017080.22838@ps20323.dreamhostps.com>



Defer to the XML specification.


HTML and XML differ in the requirements for escaping the value of 
"srcdoc". While the HTML specification defines the HTML syntax, it doesn't 
define the XML syntax and therefore should not attempt to redundantly 
repeat the rules in the XML specification. This is especially important in 
this case because the rules are remarkably complicated, and it is highly 
likely that any description we include here will be incomplete or 
misleading in some way.

The target audience for this section is people writing serialisers for 
HTML and XML documents. (The target audience isn't people who hand-author 
their documents, since srcdoc="" isn't especially useful for hand 
authoring -- the whole point is to provide defense in depth for documents 
that embed content automatically.) People writing HTML serialisers can 
legitimately be expected to be writing their software using string 
concatenation, despite this being a suboptimal design: this indeed is the 
common way for such software to be written. For these authors, therefore, 
it is helpful for the specification to describe the HTML escaping rules 
relevant here. People writing XHTML tools, though, are much more likely to 
be using tool chains that already have XML serialisers, and thus they are 
less likely to need guidance as to what to escape -- the authors of XML 
serialisers are more likely to use the XML specification than the HTML 
specification in writing their software.

The paragraph should therefore have the following qualities:

 * It should say that the situation with XML is more complex, because the 
   situation in XML is more complex.

 * It should not attempt to describe these rules, because the rules are 
   long, and not useful to readers of this specification.

 * It should defer to and reference the XML specification, because that 
   is the relevant specification for this issue.


Change the following paragraph:

   Due to restrictions of the XML syntax, in XML a number of other 
   characters need to be escaped also to ensure correctness.


   In the XHTML syntax, a number of other characters also need to be 
   escaped, as defined by the XML specification. [XML]


By explicitly stating that the XML spec's rules are relevant here, authors 
will not be misled into thinking that they can use the HTML rules for XML.



There's always the risk that someone will write an XML serialiser without 
reading the XML specification, even if we reference it.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Sunday, 6 June 2010 01:13:46 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:45:20 UTC