W3C home > Mailing lists > Public > www-forms-editor@w3.org > April 2007

xf:insert and attribute order

From: paul butcher <paul.butcher@formsplayer.com>
Date: Wed, 04 Apr 2007 11:15:44 +0100
Message-ID: <46137AD0.9010004@formsplayer.com>
To: www-forms-editor@w3.org

In the Working Draft of 22 February 2007, Items 6a and 6b in section 
9.3.5, "The insert Action" 
(http://www.w3.org/TR/2007/WD-xforms11-20070222/#action-insert)  both 
state that " If the cloned node is an attribute, then the target 
location is before the first attribute of the insert location node 
node."  Given the following, this directive is meaningless:

According to XML,
"the order of attribute specifications in a start-tag or empty-element 
tag is not significant."
http://www.w3.org/TR/2006/REC-xml-20060816/#sec-starttags

According to XML Infoset, the attributes property of the element 
information item is "An unordered set of attribute information items, 
one for each of the attributes"
http://www.w3.org/TR/xml-infoset/#infoitem.element

Also, according to the DOM, one cannot insert attributes at a given 
location with insertBefore, appendChild, or replaceChild.  Therefore, 
the only way to achieve the mandated effect would be to remove each of 
the attributes, then set them again in the correct order.  However, 
given the above, I'm not sure that would be reliable.

http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-1590626202 

and
http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-952280727 


-- 
 Paul Butcher, formsPlayer
 paul.butcher@x-port.net
 www.formsPlayer.com  standards. innovation.
Received on Wednesday, 4 April 2007 10:15:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 10 June 2009 18:12:15 GMT