Click to See Complete Forum and Search --> : Hopefully an easy question...


MattDX
04-14-2003, 08:41 AM
I have some XML and an XSLT.

sample of XML

<Form>
<Field ID="rb_PreferredDeptCity" Name="preferredDeptCity" Mandatory="" Data="//ReferenceData/PreferredDeptCity" />
</Form>

<ReferenceData>
<PreferredDeptCity>Please select:London:Cardiff</PreferredDeptCity>
</ReferenceData>

I have some javascript which takes a series of parameters and writes a drop down box to the page. The : seperated list in PreferredDeptCity will form each element (handled by the JScript).

I have a variable defined in the page as such : <xsl:variable name="refData" select="Form/Field[@ID='rb_PreferredDeptCity']/@Data" />

and then I'm attempting : SelectItem(&quot;<xsl:value-of select="Form/Field[@ID='rb_PreferredDeptCity']/@Name" />&quot;,&quot;<xsl:value-of select="Labels/Label[@ID='rb_PreferredDeptCity']/@Content" />&quot;,&quot;<xsl:value-of select="Form/Field[@ID='rb_PreferredDeptCity']/@Mandatory" />&quot;,"",&quot;<xsl:value-of select="$refData"/>&quot;);

SelectItem being the JScript method. When the drop down appears it contains one element which is '//ReferenceData/PreferredDeptCity' so it appears that the value-of select isn't happening and the value of refData is being passed straight to the HTML.

I'm sure this is something simple but it's doing my head in - any ideas?:confused:

khalidali63
04-14-2003, 08:51 AM
Better post your question at this forum

http://www.mulberrytech.com/xsl/xsl-list/

it solely deals with XSL/XSLT related topics

Cheers

Khalid