www.webdeveloper.com
Results 1 to 2 of 2

Thread: Hopefully an easy question...

  1. #1
    Join Date
    Apr 2003
    Posts
    1

    Question Hopefully an easy question...

    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?

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    2,653
    Better post your question at this forum

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

    it solely deals with XSL/XSLT related topics

    Cheers

    Khalid

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles