[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [xml-dev] Updating XML
There are some XQuery based update languages under development as part of the preparation of XQuery vNext (I think an earlier of our XQuery prototypes provided some syntax based on some of that work).
There are other, XML based updategram languages available in SQLServer 2000 and (AFAIK) in Excelon (or whatever the name of the product is now).
Best regards
Michael
-----Original Message-----
From: PaulT [mailto:pault12@pacbell.net]
Sent: Wed 11/14/2001 12:03 PM
To: uche.ogbuji@fourthought.com; Lars Martin
Cc: xml-dev@lists.xml.org
Subject: Re: [xml-dev] Updating XML
> 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")
I agree that sequence of brutal setters is not a
universal solutuion, but there could be another
approach to bi-directional XPath, still based
on /foo/bar/#value = 'value'. Apply the
way of thinking that XPath has taken, just
apply it for 'writing'.
> Of course perhaps this is a straw man. Paul, what else have you got in
> your sleeve?
I can provide a terse XPath-alike dialect that would
cover this testcase ... and many others testcases...
and you can do the same, just put the concepts of
current XPath on steroids ... Also, I can provide
improved version of XPath that would be
bi-direcional by design ( current XPath has
not been designed for updates, because
it was a part of XSL and XSL was not for
updates e t.c. e t.c. )
I was wondering if somebody already did that.
We have plenty of people, who are selling XML
tools. Big companies. Significant R&D budgets.
Standards and Standards.
I was wondering, maybe there is a terse and consistent
language for quering / updating XML.
Rgds.Paul.
-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>
The list archives are at http://lists.xml.org/archives/xml-dev/
To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>