Hi Justin and Team MODIS, I firmly believe that Sedna should support XQUF. But because XQUF is still only a candidate recommendation, it is susceptible to change and changing an existing implementation of a recommendation is A. Hard work and frustrating for the developers of the implementation, B. Code that did worked for users before may not work anymore.
I was once working on a large system using a particular version of eXist, with a lot of XQuery code. We couldn't upgrade or change the database version because far too many things fell over (because so many things had changed, version to version). I believe it would be a good idea to stick with the UPDATE language now and when XQUF becomes a recommendation then maybe consider adding an implementation which works "as well as" the existing Patrick Lehti's UPDATE language. Charles > Hi Sedna Team and Sedna Users, > > I don't know what plans there are, if any, for Sedna to change the > current update language based on XQuery update proposal by Patrick Lehti > (with Sedna improvements) to support the up-coming W3C XQuery Update > Facility (XQUF). (See latest W3C Candidate Recommendation is at this > link: > http://www.w3.org/TR/xquery-update-10/ ). > > At the moment, the current Sedna update language works quite well and > supports all of the use cases that I've come across for updating XML > documents. Perhaps one could say "If it isn't broke, don't fix it." > > But just in case the team is thinking about supporting XQUF, I would > like to point out that the current Sedna update language supports more > XML update use cases than the new W3C proposal. These are as follows: > > UPDATE delete_undeep. There does not seem to be a direct translation of > this construct in XQUF although it appears that it can be achieved using > an XQUF transform expression together with a replace updating > expression. May I ask for comments on this please. (Perhaps I've missed > something in the XQUF spec). > > UPDATE replace. With this statement, Sedna currently allows changing an > element into an attribute. In my opinion this is good because it is > quite comment to write some XML using and element to hold simple data > and then change your mind and decide to replace it with an attribute > (and vica versa). For example you might start with this: > > <invoice> > <amount>1000000.00</amount> > <description>A very large order</description> > </invoice> > > and then change your schema to this instead: > > <invoice amount="1000000.00"> > <description>A very large order</description> > </invoice> > > The Sedna statement to perform this update is: > > UPDATE replace $a in (path-to-invoice element)/amount with attribute > amount {"1000000.00"} > > With the new XQUF you cannot do this (an element cannot be replace with > an attribute) and instead you have to write this with two expressions: > one update expression to delete the amount element and one update insert > expression to insert a new amount attribute. > > See section 2.4.3.1 Replacing a Node in the XQUF spec. > http://www.w3.org/TR/xquery-update-10/#id-replacing-node > > For my taste the XQUF spec is broken in this respect and I would feel > inconvenienced to lose the functionality that the current Sedna update > language offers. > > > I think the above are important issues for Sedna users so what do others > think? > > Cheers > > Justin Johansson > > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Sedna-discussion mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sedna-discussion > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Sedna-discussion mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sedna-discussion
