For each not working when element names are not unique

webmasterbeta

New Member
I am trying to load values into a listbox. Below is my XML file and my XSLtransformation. When the element names are not unique, the listbox onlyloads ONE value!XML file<?xml version="1.0" encoding="UTF-8"?><heatsources><heatsource>Coal</heatsource><heatsource>Wood</heatsource><heatsource>Central Heating</heatsource><heatsource>Propane</heatsource></heatsources>\XSL<?xml version='1.0'?><xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"><xsl:template match="/"><select><xsl:for-each select="heatsources"><option> <xsl:attribute name="value"><xsl:value-of select="heatsource"/></xsl:attribute></option></xsl:for-each></select></xsl:template></xsl:stylesheet>TIA,Elisabeth
 
Back
Top