RE: [xsl] Passing a Map as parameter to XSLT.

Subject: RE: [xsl] Passing a Map as parameter to XSLT.
From: "DEVAL SHAH" <devals9@xxxxxxxxxxx>
Date: Mon, 06 Mar 2006 19:00:37 +0000
Hello,
Thank you for the help.

When I do
<xsl:for-each select="$XSLTParameter">
    <xsl:for-each select="key('xsltParameterMap','somekey')">
   ........
</xsl:for-each>

it works well.

Thank you for the help.

Deval



From: "Michael Kay" <mike@xxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: [xsl] Passing a Map as parameter to XSLT.
Date: Sun, 5 Mar 2006 22:09:52 -0000

>
> When I do <xsl:copy-of select="$XSLTParameter"/>
> the XML that I have passed in the parameter gets printed onto
> the output.
> It prints the following
> <map>
> <entry key="..." value="..."/>
> .......
> </map>
> .......

That's good. So you're passing the parameter OK.
>
> So I think there is some error in the xsl:key.
>
> The XSLT processor I am using is XALAN processor.
>
> Do you have any idea if I can use xsl:key with the parameter
> that I am passing ?

Yes, you can. The most important thing is to make sure that when you call
key(), the context node is a node in the "map" document.

Michael Kay
http://www.saxonica.com/

Current Thread