I would like to be able to add a namespace declaration attribute to the root tag of a DOM Document/Element.
Codewise, I'd like to go from something like this:
<xsl:stylesheet
xmlns:xlink="http://www.w3.org/TR/xlink/"
xmlns="http://www.w3.org/1999/xhtml">
To this:
<xsl:stylesheet
xmlns:xlink="http://www.w3.org/TR/xlink/"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:util="http://www.url.to.util"> <-- New namespace declaration
What I'm currently trying to do:
xsl.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:util", "http://www.url.to.util")
But clearly, that isn't working. How can I do this, though?
Thanks in advance for your help!