Namespace-aware alternative to @Parameter PlexusConfiguration
I am writing a Maven plugin (for XQuery) whose <configuration> should
allow variables to be bound to XML fragments. Moreover, the variable
names are XML QNames (like all names in XQuery), i.e., (URI, String) pairs.
declare variable local:fragement as element() external;
Now the question is how to get access to the DOM below my mojo's
From the maven-antrun-plugin's <target> parameter , I figured out
that I can use the following:
But this has two shortcomings:
- The element-attribute tree I get isn't aware of namespaces
- And I cannot navigate the XML to <variables> parent in order to work
around this by looking for xmlns attributes on ancestor elements myself.
Granted, PlexusConfiguration does at least allow my to implement the
above example (albeit with manually implemented namespace handling), but
it lacks proper namespace-awareness, as I cannot do the following: