Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
etreeutils: sort attrs with matching namespaces by their NS URIs
In several of the XML Canonicalization specifications it states that attributes with matching namespaces need to be sorted by their Namespace URIs and not the prefixes. > However, the namespace URI was selected as the primary key because > this is closer to the intent of the Namespaces in XML specification, > which is to identify namespaces by URI and local name, not by a prefix > and local name. The specifications call out that sorting by prefix is easier, but incorrect. Further, the specifications state: > An element's attribute nodes are sorted lexicographically with > namespace URI as the primary key and local name as the secondary > key (an empty namespace URI is lexicographically least). Sources: - https://www.w3.org/TR/xml-c14n11/#SortByNSURI - https://www.w3.org/TR/2007/CR-xml-c14n11-20070621/#SortByNSURI - https://www.w3.org/TR/2001/REC-xml-c14n-20010315#SortByNSURI
- Loading branch information