[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: attribute order (RE: Syntax Sugar and XML information models)
- From: Joe English <email@example.com>
- To: firstname.lastname@example.org
- Date: Fri, 30 Mar 2001 08:18:06 -0800
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.