> in attribute values; decimal character reference

The main reason that my drafts allowed > in attribute values was to
increase the likelihood that the XML produced by non-MicroXML-aware XML
tools would be well-formed MicroXML.

Given an XML tree that only contains things that MicroXML allows, an XML
serializer written in a natural way by a competent programmer is highly
likely to always generate output that is well-formed MicroXML. The
exceptions I can think of:

a) > in attribute values; a serializer may very well have a different
control path for serializing attribute values and character data in
elements, because of the need to quote " and ' in attribute values; in this
case, the attribute value control path is quite likely not to quote >
(because it is unnecessary and would be extra code to do so)

b) decimal character references; at the minimum a serializer needs to
serialize a CR in an attribute value using a numerical character reference.
 It's as reasonable to use 
 as 
 for this.

c) XML declaration

Any others?

> in attribute values also provides compatibility with Canonical XML.

I am not sure I find any of these arguments compelling but I thought I
should mention them.

James

Received on Tuesday, 4 September 2012 03:57:16 UTC