> Hi all,
>
[quoted text clipped - 39 lines]
>
> Cheapest way according to you? JDOM vs XLST
Neither choice screams out "obvious" to me. What would be easiest to put
into place in your current situation? JDOM or XSLT?
XSLT could be quite elegant (depending on what exact rules you have for
your merging).
> another very
> desirable feature is that the transformation does not rely on the
> structure so this process will be agnostic to schema refactorings.
You're still going to have to rely on some "facts" about your XML though
in order to do the merging. For example, what makes an element a valid
target for 'merging', as <key1> is in your example above? Its name? Its
depth in the XML? etc.
nospawn - 07 Apr 2006 16:20 GMT
Hi Alex,
First of all many thanks for your feedback.
For me was more obvious the JDO solution though. Because
doing something like this would become slightly of a nightmare
using XSLT, also because somehow with XSLT you would
always endup requiring to specify a XPath explicitly and this
is precisely what I would like to avoid.
Using JDOM on the other hand, you dont care about the
node names as long as they match. Structural differences
are treated as an union with complete empty values for the
missing keys in the document missing them something like
what xop does with its + operator:
http://www.living-pages.de/de/projects/xop/
Once more many thanks for your assistance.
Best Regards,
GA
Alex Hunsley - 08 Apr 2006 00:37 GMT
> Hi Alex,
>
[quoted text clipped - 5 lines]
> always endup requiring to specify a XPath explicitly and this
> is precisely what I would like to avoid.
It all depends on how much of a wiz you are at XSLT and all that jazz.
I would probably prefer JDOM myself as a more familiar, straightforward
option. OTOH, I'm sure there is some clever XSLT that would do things
generically without having to hard code paths...
> Using JDOM on the other hand, you dont care about the
> node names as long as they match. Structural differences
[quoted text clipped - 4 lines]
>
> Once more many thanks for your assistance.
Ah, thanks for that link, I hadn't heard of xop before!