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



Lars Martin:

> > > You should take a look at http://www.xmldb.org/xupdate . XUpdate
> > > defines a set of XML tags for updating XML documents. XUpdate is used
> > > in several OpenSource projects: dbXML, ozone, 4Suite (?), XMLdiff 
...

Uche Ogbuji:

> > No question mark about it.  XUpdate has been available as a utility to
> > 4Suite users since version 0.11.0.  In 4Suite 0.12.0 (ETA 
mid-December),
> > it has moved to an even fundamental architectural role: pretty much 
all
> > low-level repository updates are expressed using XUpdate (restricted 
to a
> > streamable subset of XPath for performance).

Lars Martin:

> This sounds good! :-)
> Do you have any comments on its usability?

Well, PaulT was certainly right on when he said it could be more terse.  
Of course, there are some areas where the facile approach to terseness 
would just cause more bloat:

<xupdate:update select="/foo/bar">
  <malatesta fn="sigismundo">
    <manfredi fn="manfredo">
      <gonzaga/>
    </manfredi>
  </malatesta>
</xupdate:update>

is much better IMHO to

remove(/foo/bar)
append-element(/foo, "bar")
append-element(/foo/bar, "malatesta")
set-attribute(/foo/bar/malatesta, "fn", "sigismundo")
append-element(/foo/bar/malatesta, "manfredi")
set-attribute(/foo/bar/malatesta/manfredi, "fn", "manfredo")
append-element(/foo/bar/malatesta/manfredi, "gonzaga")

Of course perhaps this is a straw man.  Paul, what else have you got in 
your sleeve?

There are some important manipulations missing from XUpdate, such as the 
addition/removal of nsdecls (though this can be done in an ugly way using 
dummy 
attributes)


> Some weeks ago we had a
> discussion about enhancements for XUpdate. What are your experiences?

Egads and little fishies!  You mean I have to catch up on yet another 
mailing list?  I popped the cork when I got to the bottom of the XML-DEV 
stack, and I just want to puke when I see the unread counts for xmldb, 
xupdate, exslt, docbook, python-dev...  It's a bloody good thing I've 
ditched xsl-list.

Seriosuly, though, I'll be sure to find the XUpdate improvement thread.


-- 
Uche Ogbuji                               Principal Consultant
uche.ogbuji@fourthought.com               +1 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Boulder, CO 80301-2537, USA
XML strategy, XML tools (http://4Suite.org), knowledge management