Re: [XML-SIG] problem in ElementTree SubElement

2006-02-08 Thread Fredrik Lundh
Dan Gunter wrote: > Right, in general XML processors don't care about attribute order (I > don't know much about canonicalization but that does sound like the > obvious exception). http://www.w3.org/TR/xml-c14n says to sort lexicographically on (namespace uri, local tag). (which, of course, is e

Re: [XML-SIG] problem in ElementTree SubElement

2006-02-07 Thread Dan Gunter
Right, in general XML processors don't care about attribute order (I don't know much about canonicalization but that does sound like the obvious exception). The XML Infoset specifically says they are an unordered set: http://www.w3.org/TR/xml-infoset/#infoitem.element ; so, if you care about or

Re: [XML-SIG] problem in ElementTree SubElement

2006-02-06 Thread Fredrik Lundh
Sbaush wrote: > is possible to preserve the order building the XML tree with DOM? no, because the order isn't important in XML. if you want to invent your own file format, you shouldn't call it XML, and you shouldn't use XML tools. ___ XML-SIG ma

Re: [XML-SIG] problem in ElementTree SubElement

2006-02-06 Thread Sbaush
is possible to preserve the order building the XML tree with DOM?2006/2/6, Radovan Chytracek <[EMAIL PROTECTED]>: Hi,   you simply can't rely on the order of attributes unless your XMLdata are in canonical form which keeps attributes alphabetically ordered. I guess this a very simple way of saying

Re: [XML-SIG] problem in ElementTree SubElement

2006-02-06 Thread Radovan Chytracek
Hi, you simply can't rely on the order of attributes unless your XML data are in canonical form which keeps attributes alphabetically ordered. I guess this a very simple way of saying that the SAX parser likely to be running behind ElementTree API layer does not preserve the order of attributes

[XML-SIG] problem in ElementTree SubElement

2006-02-06 Thread Sbaush
Hi all. I would get this element in xml:I have write this: date=ET.SubElement(idsreq,"date")        date.set("month",month)        date.set("day",day)but i get this: The attributes are not in my order!!how i can get the attributes in right order??? Thanks all.-- Sbaush