Want to choose an XPath implementation

Description

Would like to use XPath inside cargo code in order to manipulate configurations, so need to choose an xpath implementation dependency.

– Original Message –
Hi there

I have been doing some more work on support for merging within cargo
(beyond the existing patches).

What I'm currently adding is a way of manipulating the files that need
to be merged beyond the simple 'overwrite or preserve' that is in the
current patches.

For example, if you use spring, you commonly have (in web.xml)

<context-param>
<param-name>applicationContextConfig</param-name>
<param-value>context.xml</param-value>
<context-param>

If you're merging, you should concatenate the configs together to get
<context-param>
<param-name>applicationContextConfig</param-name>
<param-value>context.xml myOtherContext.xml</param-value>
<context-param>

So - what I'm envisioning is a configuration that would say something
like 'for applicationContextConfig, the output should be

<context-param>
<param-name>$left:/param-name</param-name>
<param-value>$left:/param-value $right:/param-value</param-value>
</context-param>

Where $left:/param-value is composed of
$left: - an instruction to use the left hand item in the merge
/param-value - an XPath to the value to use

My current test implementation is just using XPathAPI from the 1.5
JVM, so obviously I would need to use a different implementation that
is happy on all systems - something like xalan would need to be added
as a dependency.

WDYT?

Status

Assignee

Nigel Magnay

Reporter

Nigel Magnay

Components

Fix versions

Affects versions

Priority

Minor
Configure