← Prev in month
← Prev in thread
Re: [xml-dev] Yet another plea for XUpdate (was New XSLT, XPath, and XQuery drafts - but still no update?)
At 01:17 PM 5/2/2002 -0600, Uche Ogbuji wrote: > > I know it's a near hopeless case, politically, but I > > have no idea why there is not more consideration of > > XUpdate in these discussions. [ !!! SNIP !!! ] >http://www.xmldatabases.org/projects/XUpdate-UseCases/ > > http://www.xmldb.org/xupdate/ > > > > One problem, for sure, is that the spec needs > > polish. Depends what you mean by "these discussions". In the XML Query Working Group, I think people want an update syntax that is a natural extension of the existing XQuery language, a design goal which XUpdate does not try to address. XUpdate uses an XML vocabulary to express where updates should be made, eg: <xupdate:modifications version="1.0" xmlns:xupdate="http://www.xmldb.org/xupdate"> <xupdate:insert-before select="/addresses/address[@id = 1]/name/last" > <xupdate:element name="middle">Lennox</xupdate:element> </xupdate:insert-before> </xupdate:modifications> In the update proposal I presented at XML 2001, which is virtually identical to the proposal in the Lehti paper, the equivalent query would be: update insert <middle>Lennox</middle> preceding document("xupdate.xml")/addresses/address[@id = 1]/name/last You can use the expressions of XQuery to build up content used for updates. That's pretty useful, since the data you need to build your updates may come from many sources. For the user, I don't think that the syntax of the XQuery update is more obscure than the syntax of the equivalent XUpdate. Integration with the rest of XQuery gives you one other important advantage: type safety. That really matters for updates. At 12:49 PM 5/2/2002 -0700, Dare Obasanjo wrote: >XUpdate is an overly verbose XML syntax that only does >updates. This doesn't solve the SQL for XML problem. >On the other hand, this was the original goal of >SiXDML, one which I think it accomplishes rather well. >http://www.xmldb.org/sixdml/ >http://www.xmldb.org/sixdml/sixdml-lang.html >http://www.xmldb.org/sixdml/sixdml-api.html >http://www.25hoursaday.com/sixdml/demo.html This is another proposal that does not try to address the design goals of XQuery updates. Instead of trying to integrate with the XQuery language, it integrates with the SQL language, with a looser coupling to XSLT, as seen in queries like this: SELECT //TITLE[text()='Sandstone'] FROM auctiondata/auction1.xml AND TRANSFORM WITH XSLT IN{ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> <xsl:template match="/"> <HTML> <HEAD><TITLE><xsl:value-of select='/document/title'/></TITLE></HEAD> <BODY><xsl:apply-templates/></BODY> </HTML> </xsl:template> <xsl:template match="TITLE"> <H1><xsl:apply-templates/></H1> </xsl:template> </xsl:stylesheet> } Both of these languages can be used for updates, but neither obviates the need for an XQuery update syntax, IMHO. Jonathan
← Prev in month
← Prev in thread