Lists Home |
Date Index |
Last week there were a few posts regarding making XML less verbose. I'm
quite sure these suggestions must have been aired before, but how about
adding the following simplifications to XML 1.2?
1) Allow </> as an abbreviation for any closing tag. After all
<xsl:template>...</xsl:template> is rather long-winded and the element name
in the closing tag is completely redundant. I believe the closing tag
syntax is probably a throw-back to SGML compatibility, but if XML 1.x
discards that baggage then I think this would be a good thing to do. I for
one get fed up with typing this redundant information especially when
authoring XSLT stylesheets.
The ETag production would change to
 ETag ::= '</' Name? S? '>'
If Name is specified (it's optional), it must match Name from the STag
2) Allow non-quoted simple parameter values. Sometimes I get caught out
when copying-and-pasting HTML into my XML documents because the parameter
values are unquoted. I'm not sure why XML added this constraint - perhaps
to make parsing easier? Anyway, I would like to be able to specify NmToken
values without having to use quotes like so:
<test p1="not a nmtoken" p2=3.0 p3=1 p4=nmtoken/>
The AttValue production would need to change to:
 AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] |
Reference)* "'" | NmToken
3) Remove the restriction preventing ]]> from being included in PCDATA.
This was only included "for compatibility" anyway.
These suggestions have the virtue of being backwards compatible because they
would not break any existing well-formed documents.
All the best