XUpdate update

by Uche Ogbuji

Related link: http://xmldb-org.sourceforge.net/xupdate/

XUpdate is a product of the XML:DB group, but it is designed for use far beyond XML databases. It's a lot like XSLT, being an XML-based host language for XPath expressions, but XUpdate instructions are tailored for update tasks. Doing the equivalent in XSLT is rather clumsy, which is to be expected since XUpdate is specialized for the purpose. I'm a big fan of XSLT, as my body of work amply proves, but I prefer XUpdate for what it does best.

XUpdate has always been a shoestring community standard, and has always been skeletal, and somewhat incomplete. Despite this fact, it has over a dozen implementations (half of which can be used independently of any XML databases). This relative success is because it is simple to understand and simple to implement. XUpdate is a poster child for worse-is-better.

There is a low-volume mailing list, which used to be riddled with spam, but has since been brought under control by Per Nyfelt. I think a lot of XUpdate discussion has been directed more towards implementation mailing lists rather than the general spec list. Certainly, we get a lot of questions about 4Suite's XUpdate implementation. There is also a very useful use cases document by Kimbro Staken. The main problem with this document is that it includes some controversial use cases that are not included in the actual spec. This is one of the things that will, I hope, be cleared up soon. I also hope the many links to outdated XUpdate spec locations will be fixed.

As a meter of XUpdate's continuing relevance, and as a service to interested users, I've compiled a list of projects that include separate XUpdate implementations.

  • XML:DB XUpdate--reference XUpdate implementation in Java

  • 4Suite--XUpdate available via Python API, command line or XML repository

  • xmldiff--Python tool to generate XUpdate "diffs" between XML files

  • RxUpdate--An "enhanced" XUpdate implementation in Python, including RDF support

  • Apache Xindice--XML DBMS in Java. "At the present time Xindice uses XPath for its query language and XML:DB XUpdate for its update language."

  • eXist--XML DBMS in Java.

  • Ozone--XML DBMS in Java.

  • X-Hive/DB--XML DBMS in Java. See the XUpdate page

  • dbXML--XML DBMS in Java. "XUpdate is also a transformation with some of the same goals as XSLT, but its syntax is simpler, and its purpose is to modify the content of documents in place."

  • Orbeon PresentationServer--full-blown XML platform thingy, in Java. See docs on the XUpdate engine and lower-level processor. The latter link includes a useful intro to XUpdate.

  • Jaxup--"A Java XML Update engine"

  • Mobius Mako Command Line Utilities--Mobius is a Grid technology project. Mako is "a service that exposes and abstracts data resources as XML", supporting XUpdate.

  • Montag--"a Java Web Services based system for the interaction with every Native XML Database that supplies a Java implementation of the XML:DB API." Includes XUpdate support.

  • XML-XUpdate-LibXML--Perl implementation

If you know of any I haven't mentioned, please point them out in comments. Overall, I hope you at least have a look at XUpdate for relevant tasks, and better yet, become involved. It has about as low a barrier to entry one could possibly imagine.

Do you use XUpdate? Or do you really not accept its relevance?


2005-04-29 02:00:50
XUpdate specification
Where is the specification? Is it http://xmldb-org.sourceforge.net/xupdate/xupdate-wd.html ? If so it's not been touched for 5 years. This spec doesn't appear to be able to handle namespaces in target documents.
2005-04-30 13:16:35
I think it's this one
2005-05-02 16:12:32
I think it's this one
Looks like the sourceforge site is just a mirror of this. My comments still apply.
2005-05-02 16:52:38
Your Perl module link is broken: it should be http://search.cpan.org/dist/XML-XUpdate-LibXML/

(It is better for search.cpan.org links to use /dist/ instead of a specific author’s directory since it will always point to the latest version, even if maintainership changes hands.)

2005-08-11 00:54:24
Still need convincing

I was looking into XUpdate a number of years ago for non-database applications. I have been particularly interested from the perspective of keeping a large XML document synchronised between two distributed processes. Unfortunately, it seemed to me over time that XUpdate had been tied to the XML database idea, and when the hype died down over XML:DB XUpdate seemed to pass, too.

The examples in this article are mostly XML databases. It's natural they have XUpdate implementations, because that's the closest thing XML databases got to having a standard. What I would like to get ahold of is a liberally-licensed java implementation that simply applies an XUpdate DOM/SAX stream/whatever to a DOM. I've looked breifly at the products on offer and am not sure that this simple need is met.

I have to admit that seeing the specification not being worked on for four or five years does make me doubtful about its future.