on 02-07-2011 11:50 AM
I need to pass a param value to xslt dynamically using xml query template.
I have xml query, where I am using xslt transformation.
Now I need to set the xslt param(SelectName) value as query's [Param.1].
How can I do this.
I have this code in my xslt file:
<xsl:param name="*SelectName*"/>
<xsl:template name="description" match="/">
<xsl:for-each select="Rowsets/Rowset/Row[Unit='$*SelectName'*]">
.
.
.
What is your xml query URL? For simplicity sake I would eliminate the asterisks and just keep the xsl param name simple text.
Have you tried appending &SelectName=XXX in your URL?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My xml query url is:
I tried using &SelectName='[Param.1]' in the end of xslt url.
Is it safe to assume you're using your xslt as the stylesheet in an IRPT SERVLET call?
Given the sample URL for the XMLQuery template you can add a line like this to your SERVLET section:
<PARAM NAME="Param.1" VALUE="xxx">
Or since the SERVLET is calling the Illuminator servlet, you can skip this in the query template and just use:
<PARAM NAME="SelectName" VALUE="xxx">
*************************************************************************************************
Consider the folowing example, which uses the built in /XMII/Stylesheets/IllumList.xsl which contains an xsl param called ListSize to control the html select attribute for size (1 becomes a drop down box, and sizes greater become scrolling list boxes)
In a blank IRPT page add:
<SERVLET NAME="Illuminator">
<PARAM NAME="Server" VALUE="Simulator">
<PARAM NAME="Mode" VALUE="TagList">
<PARAM NAME="Content-Type" VALUE="text/xml">
<PARAM NAME="ListSize" VALUE="{HowBig}">
<PARAM NAME="StyleSheet" VALUE="/XMII/Stylesheets/IllumList.xsl">
</SERVLET>
Save the page and call it In a browser like this:
...TestPage.irpt?HowBig=5
User | Count |
---|---|
9 | |
7 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.