Change proposal for ISSUE-103

ISSUE-103
=========

SUMMARY

Defer to the XML specification.


RATIONALE

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.


DETAILS

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.

...to:

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


IMPACT

POSITIVE EFFECTS
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.

NEGATIVE EFFECTS
None.

CONFORMANCE CLASS CHANGES
None.

RISKS
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