[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
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">
> is much better IMHO to
> 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.