xsl-list
[Top] [All Lists]

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

2011-09-19 09:15:37
Martin, Andrew

Defining a prefix to associate with the URI accomplished what I wanted.  

<xsl:key name="definitions" match="myns:glossentry" use="myns:term/@key"/>

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

I hadn't realized the key function had been extended to add the "top"
parameter in XSLT 2; It's a nice simplification to get the key evaluated in
the desired context. 

Thanks to you both for your replies.

Murray


--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>