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 <FormElementtype="dropdown"id="Parent"label="CC1"associatedChildID="Child"cascadingLevels="2"required="no"labelafter=""labelAfterStyle="Plain"tooltip=""status=""copy="true"changed="0"visibility="visible"><choicevalue="1|234"status=""/><choicevalue="2|345"status=""/><choicevalue="2|245"status=""/><choicevalue="2|456"status=""/><choicevalue="3|456"status=""/><choicevalue="3|344"status=""/><choicevalue="4|333"status=""/><choicevalue="4|567"status=""/><choicevalue="5|"status=""/><choicevalue="6|345"status=""/></FormElement>Here is my xslt <xsl:whentest="@associatedChildID!=''" ><xsl:variablename="dataVal"><xsl:for-eachselect="choice"><xsl:value-ofselect="concat(.,@value,',')"/></xsl:for-each></xsl:variable><asp:DropDownListid="{@id}"runat="server"style="{@visibility}"onchange="populateData(this,'{@associatedChildID}','{$dataVal}','{@cascadingLevels}')"RepeatColumns="5"CssClass="frmValue" ><asp:ListItemValue=""><xsl:value-ofselect="''"/></asp:ListItem><xsl:variablename="uniqueChecker"><xsl:variablename="listValue"select="substring-before(@value,'|')"/><xsl:for-eachselect="choice"><[color="#2b91af
xslt unique values for a dropdownlist using xslt
in XSLT/XSL-FO
Posted
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