I have a XSLT I've created to handle a particular xml document. However, now namespaces are being introduced in some, but not all of our documents. I'd like to use the same XSLT for these documents, however I'm having trouble modifying my stylesheet to be namespace agnostic.
It's been suggested previously to modify my xpaths to *[local-name()="ElementName"]
, however considering we've already made a stylesheet, this is very labor intensive.
In addition, I am aware I can set the xpath-default-namespace
to the particular namespace, but as mentioned earlier, I cannot simply set it to #all or a list of possible namespaces. I'm looking for a more effective solution and have the extension functions of the Saxon processor available to me. Any ideas? Thanks.