Re: [xsl] xpath-default-namespace with a variable

Subject: Re: [xsl] xpath-default-namespace with a variable
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Mon, 19 Sep 2011 15:19:22 +0200
Murray McDonald wrote:
I am using XSLT 2 via AltovaXML.

<xsl:variable name="definition">
	<xsl:for-each select="$glossaryDocument">
		<xsl:value-of select="key('definitions',
$normalizedText)/definition" xpath-default-namespace="
http://www.abcdef.com/hij"/>
	</xsl:for-each>
</xsl:variable>

By the way, with XSLT 2.0 you don't need the for-each, instead doing


<xsl:value-of select="key('definitions', $normalizedText, $glossaryDocument)"/>

suffices.



--

	Martin Honnen --- MVP Data Platform Development
	http://msmvps.com/blogs/martin_honnen/

Current Thread