Jeff Greif wrote:
That's what I explained in my previous mail. MyPrefixResolver gets a mapOK ... I misunderstood ....That's the part that I missed. I have to try this to believe it.
that looks like this {"__mm7__" -> "namespace1",
"__ns8__" ->"othernamespace", ...}. You write your xpath using
/__mm7__:foo/__mm7__:bar without any regard for what prefixes are used in
the document. The resolver resolves prefix __mm7__ to namespace1, which
will match to corresponding nodes from namespace1 in the document,
regardless of what prefix is used in the document.
Maybe somebody needs to setup an FAQ on how to do this ... because I would probably not be the last one to ask this question.
The only way you'd be messed up is if someone actually used __mm7__ in the document to refer to some other namespace, which is why I suggested using unlikely prefixes in the map and the xpath.
If your above suggestion works ... then I am ok with it in my specific case... although it be better to have a solution that works on all cases. :)
