XSL:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform" xmlns:t="http://testuri">
<xsl:template match="t:root">
<xsl:value-of select="namespace-uri()"/>
</xsl:template>
</xsl:stylesheet>
XML:
<t:root xmlns:t="http://testuri" title="Testelement"></t:root>
Returns:
<?xml version="1.0" encoding="UTF-8"?>
http://testuri
Christian
On 10 Dec. 2009, 12:21, Brilt <simonjpaul...@gmail.com> wrote:
> Hi,
>
> I am using an XSL style sheet to process a WSDL XML file, but need to
> access the name spaces of the document in the definitions element to
> insert into the output. If I iterate the attributes of the element,
> the name space attributes are missing. Can XSL access this
> information?
>
> For example, this XSL
> <xsl:for-each select="/wsdl:definitions/@*">
> <xsl:value-of select="name(.)" /><xsl:text> = </
> xsl:text><xsl:value-of select="." /><xsl:text> </xsl:text>
> </xsl:for-each>
> <xsl:text> </xsl:text>
>
> produces only:
> name = test
> targetNamespace =https://localhost:5006/