OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xml-dev] Updating XML



PaulT wrote:
> XPath is terse, XUpdate is not. I'm wondering, may there
> is any terse alternative to XUpdate? To write those update
> queries by hand... To me it looks funny that one can use
> 100% pure terse XPath to write a readable query for
> 'select', but one should  write a verbose XML-ish
> spell to make 'update'.

The value to XUpdate being an XML format rather than a scripted format
(like XQuery) is that it allows XUpdate queries to actually be stored in
an XML database without being wrapped.  It also allows for easy
on-the-fly building of queries using typical XML tools (DOM or SAX).  

We've been using Lexus as our XUpdate implementation for a while now and
are pretty pleased with it.  It's a solution that, while not as
'complete' as XQuery is and ultimately will be when they actually get
around to adding update logic, is here today, and does the job.  My only
wish for it is that it would support parameterized queries, and
mutli-collection joined selection logic (at least) for updating
purposes...  I'm not a big fan of XQuery, and I hope that it dies a
quick and painful death.

> I don't understansd why XML should be soo different
> from SQL in this aspect.

Cuz SQL sucks, and adding XML facilities to it, or creating an XML query
language like it, is much more of a headache than it's worth... (See
SQLX)

> PS. With CPath and Chunks http://www.pault.com/pault/pxml/nxml.html
> one can read with /get/some/#value and put with /put/it/#value = 'value'.
> 
> Something similiar could be done with XPath subset.
> I'm wondering, maybe somebody already did that.

XUpdate provides a bit more functionality than that.  Especially
important is that you'd be updating and insert fragments of XML rather
than strung together XPath assignments.

-- 
Tom Bradford - http://www.tbradford.org
Developer - dbXML - http://www.dbxml.org
Maintainer - jEdit-Syntax - http://syntax.jedit.org