XSL で実行時に Document (root-node) Attribute の値を変更することは可能ですか?
お気に入り:
<Document xmlns="http:\\someURL.com" xmlns:xsi="http://www.w3.org">
に:
<Document xmlns="urn:iso:std:iso" xmlns:xsi="http://www.w3.org">
xmlns は属性ではなく、ドキュメントの名前空間です。
(名前空間の宣言や、属性と構文的に似ている処理命令の一部のようなもので、key=value 形式を持つものは、疑似属性と呼ばれます。)
ただし、要素をコピーして、次のような別の名前空間で宣言できます。
<xsl:template match="*">
<xsl:element name="{local-name()}" namespace="urn:iso:std:iso" >
<xsl:apply-templates select="@*" />
<xsl:apply-templates />
</xsl:element>
</xsl:template>