Slightly Off Topic .....
Anyway I have been trying to figure out the best way to update (using a
script) version numbers stored in several XML files; to keep them in
sync as it were.
We are using maven & eclipse so in total there end up being about 5 XML
files that need the same version number stamped into them to update the
version number of the "product"
Now I can easily write an XPath expression to get the version number out
of the files in question, what I can't figure is how to update the
values 'in-place'
Lets say I have some XML like this (slightly different to what would be
in a project.xml, but I need to update that too)
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="com.versata.xml.fun"
label="com.versata.xml.fun"
version="1.0.0"
provider-name="Versata, Inc."
primary="true">
<description>
Its Great
</description>
<copyright>
Copyright (c) 2002 Versata, inc. All Rights Reserved
</copyright>
<license>
Empty License Agreement
</license>
<url>
<update label="Versata Plugin"
url="http://a.b.c/lynx/builds/nightly"/>
</url>
<requires>
<import plugin="org.eclipse.swt"/>
[snip]
Anyway I want to leave the rest of the file alone & just set
//feature/[@version] to a new value
With XSL it seems like I'd have to do something very complicated to
leave all the other elements alone (i.e. copy them through as is) and
just modify the //feature/[@version] on the way though.
Is there something in Jelly that will make this easier; or do I just
have to slog it out and copy each element over and update just the one I
want ?
Thanks for any pointers
Matthew
--
To unsubscribe, e-mail: <mailto:turbine-maven-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-maven-user-help@;jakarta.apache.org>