Jump to content
Sign in to follow this  
ensonique

xslt unique values for a dropdownlist using xslt

Recommended Posts

hi I'm new to xslt world. I'm understanding that xslt is not a procedure language. What I'm trying to achieve is a cascaded dropdown list, where the values showed in the lower level dropdown list will be depend on the value selected in the upper level dropdown. The parsing of the data and populating the data to the lower level dropdown is done through javascript. Here is my xml <FormElement type="dropdown" id="Parent" label="CC1" associatedChildID="Child" cascadingLevels="2" required="no" labelafter="" labelAfterStyle="Plain" tooltip="" status="" copy="true" changed="0" visibility="visible"><choice value="1|234" status=""/><choice value="2|345" status=""/><choice value="2|245" status=""/><choice value="2|456" status=""/><choice value="3|456" status=""/><choice value="3|344" status=""/><choice value="4|333" status=""/><choice value="4|567" status=""/><choice value="5|" status=""/><choice value="6|345" status=""/></FormElement> Here is my xslt <xsl:when test="@associatedChildID!=''" ><xsl:variable name="dataVal"><xsl:for-each select="choice"><xsl:value-of select="concat(.,@value,',')"/></xsl:for-each></xsl:variable><asp:DropDownList id="{@id}" runat="server" style="{@visibility}" onchange="populateData(this,'{@associatedChildID}','{$dataVal}','{@cascadingLevels}')" RepeatColumns="5" CssClass="frmValue" ><asp:ListItem Value=""><xsl:value-of select="''"/></asp:ListItem><xsl:variable name="uniqueChecker"><xsl:variable name="listValue" select="substring-before(@value,'|')"/><xsl:for-each select="choice"><[color="#2b91af

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...