Re: Canonical MicroXML

On Tue, Oct 2, 2012 at 6:05 AM, James Clark <jjc@jclark.com> wrote:

> On Tue, Oct 2, 2012 at 4:37 PM, James Fuller <jim@webcomposite.com> wrote:
>
> I use xml canonisation all the time for precise diff calcs that have
>> nothing to do with security (for example genetic algorithm fitness,
>> which must characterise precisely differences between 2 files) …
>
>
> I hear you. I believe the first version of XML Canonicalization was
> actually defined by me for the purposes of parser testing:
>
> http://www.jclark.com/xml/canonxml.html
>
> The C14N specs make incredibly heavy weather of defining something that is
> very simple.
>
> We could add an Appendix that defines it very succinctly as follows.
>
> The Canonical MicroXML for a document is the unique MicroXML document that
>
> a) has the same data model as that document
> b) matches the grammar below (productions not defined below are as defined
> in the body of the spec)
> c) has attributes in lexicographic (Unicode code point) order
>
> document ::= element #xA
> element ::= startTag content endTag
> startTag ::= '<' name attributeList '>'
> endTag ::= '</' name '>'
> content ::= (element | dataChar | charRef)*
> attributeList ::= (space attribute)*
> attribute ::= attributeName  '='  attributeValue
> attributeValue ::= '"' ((attributeValueChar - '"') |
> attributeValueCharRef)* '"'
> attributeValueCharRef ::= charRef | '&quot;'
> charRef ::= '&lt;' | '&amp;' | '&gt;'
> space ::= #x20
>
> Is this worth including in the spec?
>

I think in principle it certainly is, but we've been cautious about page
count for reasons of perception.  We could just go ahead and make it a
separate spec, as a demonstration that building on MicroXML the support
specs can be very, very simple indeed.  That's my slight inclination at
moment.


-- 
Uche Ogbuji                       http://uche.ogbuji.net
Founding Partner, Zepheira        http://zepheira.com
http://wearekin.org
http://www.thenervousbreakdown.com/author/uogbuji/
http://copia.ogbuji.net
http://www.linkedin.com/in/ucheogbuji
http://twitter.com/uogbuji

Received on Tuesday, 2 October 2012 13:33:19 UTC