I feel compelled to take the XML hard line, and point out that depending on
the ordering of XML attributes is not compliant:
XML Information Set
W3C Recommendation 24 October 2001
2. Information Items
2.2. Element Information Items
An element information item has the following properties:
5. [attributes] An unordered set of attribute information items, one for
each of the attributes (specified or defaulted from the DTD) of this
element. Namespace declarations do not appear in this set. If the element
has no attributes, this set has no members.
If you're going to use XML, then use XML, and don't break the spec.
The worse thing you could do is to use
That's asking for trouble, and guarantees there will be problems down the
The whole point of using XML is so people can have the valid expectation
that their XML data will work with any compliant XML tool.
As somebody else pointed out, many XML editors reorder the attributes (which
they are 100% justified in doing), and that is as much a fact of life as
what they do with the newlines and white space.
If you're going to define a language that's not XML because it depends on
attribute ordering, then please use an obviously different syntax (like
parenthesis instead of angled brackets), so as not to mislead and confuse
people, or corrupt data.
If you just want to attach ordered items to an XML element, then use
sub-elements which can be ordered, not attributes which are by definition
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -