I use MOXy's @XmlPath("/foo/bar[@baz]")
.
Elsewhere in the app I need XSLT 2.0 so I included Saxon HA 9.5 on my classpath. But that caused the XPath fail (doesn't find the nodes, unlike JDK's implementation).
How can I set for MOXy which XML / XPath impl to use?
Currently I use jaxb.properties
next to JAXB bean's .class
, but I'm okay to create the marshaller with some factory options or such.
Bonus question: I think the problem with XPath is that the XML file uses namespaces, <deployment xmlns="urn:jboss:bean-deployer:2.0"> ...
How can I make Saxon ignore namespaces in XPath? (without rewriting the XPath expression).