Closed vrurg closed 1 year ago
LibXML doesn't seem to have any way of setting a default namespace for XPath queries.
I'm guessing that IntelliJ is using the javax.xml.xpath setNamespaceContext()
method.
I agree that it'd be nice to have. But I think it'd need to be implemented in libxml2.
Ok, no sense to have this opened then.
Thank you!
Is it generally possible to register a namespace on XPath context with no prefix? Taking an SVG, for example:
Because currently the only way to get it working is to:
I tried to remove definedness from
registerNS
prefix parameter, but then it fails deeper inlibxml2
itself.An example of what's expected couldbe IntelliJ XPathView+XSLT plugin where it automatically picks up the default NS for its context.