[Standards-JIG] Re: JEP-0091: Delayed Delivery

Joe Hildebrand hildjj at gmail.com
Sun Feb 19 22:11:36 UTC 2006

There is no requirement for XMPP XML to be in canonical form that I  
know of.

As well, http://www.w3.org/TR/REC-xml/#sec-starttags says:

"Note that the order of attribute specifications in a start-tag or  
empty-element tag is not significant."

RFC 3920 calls out http://www.w3.org/TR/REC-xml-names/, not http:// 
www.w3.org/TR/xml-names11/.  At http://www.w3.org/TR/REC-xml-names/ 
#ns-decl we see this:

"A namespace is declared using a family of reserved attributes. Such  
an attribute's name must either be xmlns or have xmlns: as a prefix.  
These attributes, like any other XML attributes..."

Therefore, xmlns= and xmlns:foo= are just attributes, and attribute  
order is not significant.

In particular, many DOM implementations do not surface the order that  
attributes came in.

In practice, almost ALL XMPP processors that I've run into don't care  
about the order that their attributes are serialized, so you're going  
to get them out of order no matter what you think is correct. :)

Conclusion: you must parse the entire start-tag or empty-element  
before you know what namespace it, or any of it's attributes are in.

Corollary: stpeter, if you want to reorder attributes in examples to  
make them easier to read, cool, but there's no need, it's just busy- 

On Feb 18, 2006, at 9:25 AM, Ian Paterson wrote:

>>> Is it a requirement that xmlns must be the 1st attribute
>>> following the <x> element?
>> Next we look at "Canonical XML":
> [snip]
>> Therefore Tony is right and the xmlns "attribute"
>> (in fact it is a "reserved attribute", in Xpath
>> called a "namespace node") does belong first.
>> I'll have to go through the existing JEPs to
>> clean that up.
> Is this necessary? (I thought there was no requirement for XMPP XML to
> be in Canonical form.)
> - Ian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1883 bytes
Desc: not available
URL: <http://mail.jabber.org/pipermail/standards/attachments/20060219/bdd27a5f/attachment.bin>

More information about the Standards mailing list