SAX: Attributes

David Megginson ak117 at
Mon Jan 5 01:18:59 GMT 1998

Sean Mc Grath writes:

 > Annex G of the SGML handbook just says the order is insignificant. However,
 > nsgmls ESIS supplies then in declaration order and I for one have written
 > apps that relied on that. Perhaps writing apps that rely on a specific
 > order of attribute event arrival is just plain bad design!

The order of attributes should never be significant (how would you
deal with defaulted attribute values?) -- perhaps making this point
explicit would be a good minor change for the PR (Tim?).

 > Anyway, the dictionary approach, supplying all the attributes in one go
 > side-steps buffering and state space for simple little SAX apps. that want
 > to pick
 > up attributes X and Y of element Z and nothing else.
 > While on this subject, what comes first, a start-tag event or its attribute
 > event(s)?

I prefer to put the attributes first, so that all the information will
have been delivered by the time the startElement event arrives.

All the best,


David Megginson                 ak117 at
Microstar Software Ltd.         dmeggins at

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as:
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list