OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: attribute order (RE: Syntax Sugar and XML information models)

Simon St.Laurent wrote:
> Is there some kind of processing advantage for _parsers_ (not applications)
> to report attribute values in any sequence other than their original sequence
> ?

Attributes are most often accessed by name, so
there is an advantage (for both parsers and applications)
to store them in a finite map / hash table / associative array.
In this case the parser reports them "all at once", not
in any particular order.

For the parser, this representation makes it marginally easier to
verify the "no duplicate attribute names" WFC and (if DTD-aware)
fill in default values.

It also makes namespace processing somewhat easier to deal with
(although I suppose the XMLNS recommendation could have specified
that namespace declarations must syntactically precede attribute
value specifications, had it not been foreordained that attribute
order is insignificant).

This isn't very compelling, I admit.

--Joe English