[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Yet another plea for XUpdate (was New XSLT, XPath, and XQu


xupdate
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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.