[Home] [By Thread] [By Date] [Recent Entries]
Hello, Thank you for the reply. I am still not able to access the parameter that I pass to XSLT. Let me explain what I want to do. I want to pass in key,value pairs to XSLT. I hava a Map object in Java which contains this key value pair. I read in some forum that there is no direct way to pass this object as a Map so I need to convert it into xml format. So I am converting it into a xml format and setting it as the parameter. I am using javax.xml.transform.Transformer. I set the parameter as: transformer.setParameter("XSLTParameter",xmlDoc); where xmlDoc is some org.w3c.dom.Document object. Now in xsl I try to get this parameter using <xsl:param name="XSLTParameter" />. I want to loop through the xml document that I have passed in XSLTParameter using some key. So I define <xsl:key name="xsltParameterMap" match="/*/map/entry" use="@key"/> I Tried to loop in following manner. <xsl:for-each select="key('xsltParameterMap','line')">
.........
</xsl:for-each>XSLT is not going inside this loop. I am sure I am setting 'line' as one of the key value in the XML that I am passing as parameter to the XSLT. So it should go inside the loop. Any help on this ? Thanks Deval From: "Michael Kay" <mike@xxxxxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: RE: Passing a Map as parameter to XSLT. Date: Fri, 3 Mar 2006 22:57:18 -0000
|

Cart



