Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listbox using parameters

Status
Not open for further replies.

ibike

Programmer
Apr 7, 2003
27
0
0
IT
Hello,

I've the following problem when I try to use parameter for create my listbox.

I call my template which get my listbox name as parameter:

<xsl:call-template name=&quot;DisplayFieldTemplate&quot;>
<xsl:with-param name=&quot;FieldDataListName&quot;>
<xsl:apply-templates select=&quot;//ListData/PriceList&quot;/>
</xsl:with-param>
</xsl:call-template>

and then this &quot;DisplayFieldTemplate&quot; get my listbox name as a parameter 'FieldDataListName':

<xsl:template name=&quot;DisplayFieldTemplate&quot; >
<xsl:param name=&quot;FieldDataListName&quot;/>
<td>
<xsl:value-of select=&quot;child::text/text()&quot;/>
<xsl:apply-templates select=&quot;key ('Code',@FieldDataListName)&quot;/>
</td>
</xsl:template>

The 'Code' is that section in my .xml which is contains the data for listbox.
When I try to display my stylesheet I can only see the emlements from the .xml but there's no listbox creating at all.
Can somebody tell me how should I handling this problem?

Thank you for every feedback in advance!
 
> Can somebody tell me how should I handling this problem?

Well, you could start by posting your query to the correct forum - XML/XSL queries should go to forum426 .

My XSL's a bit rusty, but shouldn't it be

<xsl:apply-templates select=&quot;key ('Code',$FieldDataListName)&quot;/>

also you haven't posted any code which inserts the html markup for the list box - there should be a <select> and some <option>s somewhere if you're going to get a list box!


-- Chris Hunt
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top