xsl-list
[Top] [All Lists]

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

2011-09-19 08:19:34
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/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--