Hi! I have been following the discussion about the latest discussion and would like to contribute my humble opinion.
My viewpoint on this is from the viewpoint of general databases and also from love of the remarkable simplicity and usefulness of xml, xpath and xslt. The existence of either an attribute named "before" or an attribute named "after" does not feel xml-like. Therefore I would rather favour the special tags <xupdate:insert-before> and <xupdate:insert-after> (similarly for move, append and whatever). Another way would be rather classic, using a required attribute: <xupdate:insert position='before' location='/adresses/adress[1]'>. However the choice between a special tag or a required attribute does to me not seem so important, except that the classic approach would probably make it slightly easier to write and maintain xslt-code to transform documents containing xupdate-tags. The child-attribute I do not like at all. It feels somehow wrong to specify an absolute position in such a way. Besides, xpath is fully capable of handling the situation: /addresses/*[1] indicates the first child element of /addresses, while /addresses/address[1] indicates the first address child of /addresses. Actually the xpath becomes more interesting in the case: /customers/addresses/address[1] because in this case there could be several addresses elements, so the expression could actually refer to a node-set, while /customers/addresses/address[first()] would refer to just one node, the first element that fits the description. Side-track: How are node-contexts and node-sets controlled/handled in xupdate? What if there exists an unknown (to you) ordering of child-elements (defined by someone else or just by the database)? I think (correct me if I am wrong) that it is a strong recommendation in xml that one should not place too much meaning on the actual order of child-elements. The big use of "document order" is just to set a standard and "document order" is just the order in which the child elements were inserted. Sorting of elements is always done at presentation-time if it is important. Nevertheless, perhaps it is useful to be able to control the order, for example, if the elements are paragraphs in a text, we never have a specific numbering of those other than document order. I would like to propose that a third alternative is added: <xupdate:insert-into> (also <xupdate:append-into> and <xupdate:move-into>) This, I think, would be the most useful in a general xml-database, while the before and after versions would be needed in systems like revision control systems of text where ordering often is implicit (that is "document order"). Now that I look at it, I fail to see the big difference between insert and append. It would be more important to have an <xupdate:replace> element and an <xupdate:replace-or-insert> element (the first version gives an error if the element to be replaced is not found) Sorry for a long and rather muddled letter, but I hope that at least something in it was useful. Best regards Torbjörn Gannholm (The above letter does not in any way necessarily represent the official opinion of my employer) ---------------------------------------------------------------------- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe: mailto:[EMAIL PROTECTED] Contact administrator: mailto:[EMAIL PROTECTED] Read archived messages: http://archive.xmldb.org/ ----------------------------------------------------------------------