Thanks for the info Mike. I'm using Axkit and I'd rather not switch,
and actually I haven't been using any java OR python (!) so I'd prefer
(for the present project) to stay away from those unless I have to pick
it up.
In reviewing my own needs and what XUpdate does last night, I'm not
even sure it's quite the right fit. What I want to be able to do is to
do a sort of hybrid of insert and update, where if the element is
there, it simply updates and if it isn't, it inserts intelligently
(creating only the nodes/steps that are needed). In other words, given,
<aaa><bbb/></aaa>
and insert_xpath = aaa/bbb/ccc and insert data=Hello_World the result
would be
<aaa><bbb><ccc>Hello_World</ccc></bbb></aaa>
AFAI can tell, there no one-shot XUpdate command to do that ... and I
think I can implement it pretty easily in XSLT (at least as easily as
trying to do it in XUpdate). So I think I'll roll my own for starters
and see where I get.
Simon
On Wednesday, April 16, 2003, at 04:01 AM, Mike Brown wrote:
Anyway I noticed that the 4Suite implementation is in python which is
cool but not so good for me since so far I'm doing everything in XSLT
... is there an Xupdate implementation in XSLT?
What we did in 4Suite, aside from the python API and the 4xupdate
command-line
utility, was make an XSLT extension element that takes an XUpdate doc
given in
its content and applies it to the file that was supplied for the
source tree.
Unfortunately for you, it is only usable when the stylesheet and
source doc
are in, and the transformation is being invoked by, 4Suite's resource
repository (a document store with various interfaces). It won't work on
arbitrary docs coming in from ordinary files or streams.
However, it wouldn't be too much trouble to write an extension element
that
can be used more generally. Post to the 4suite list [1] about it, if
you're
interested in this. Of course this might lock you into using our XSLT
processor, which may not yet be stable or fast enough for your needs.
Many
people use it without complaint, though. It *might* be possible to use
4Suite's Ft.Xml.XUpdate module from within Jython, if you want to try
writing
the extension element for a Java based processor. I don't know if
anyone has
ever attempted this.
As for a pure XSLT + EXSLT implementation, I don't know of any, but
that would
be an interesting project.
[1] http://lists.fourthought.com/
Mike
--
Mike J. Brown | http://skew.org/~mike/resume/
Denver, CO, USA | http://skew.org/xml/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
--
www.simonwoodside.com -- 99% Devil, 1% Angel
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list