xsl1.0を使用しています。プレフィックスから名前空間URIを取得する必要があります。
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:a1="http://example.com/arthemetic/integers/a1">
<soapenv:Header>
</soapenv:Header>
<soapenv:Body>
<a1:add>
</a1:add>
</soapenv:Body>
</soapenv:Envelope>
プレフィックスa1の名前空間URIを取得したいのはhttp://example.com/arthemetic/integers/v1
です。
これが私が試しているコードです。
<xsl:template match="/">
<xsl:variable name="operationName">
<xsl:value-of
select="name(/*[local-name()='Envelope']/*[local-name()='Body']/*[1])"></xsl:value-of>
</xsl:variable>
<xsl:variable name="prefix">
<xsl:value-of select="substring-before($operationName, ':')"></xsl:value-of>
</xsl:variable>
<xsl:variable name="ns-node"
select="namespace::node()[.= $prefix]" />
dfadsfdfadsf
<xsl:value-of select="$ns-node" />
</xsl:template>
</xsl:stylesheet>
しかし、名前空間を受け取っていません。