【发布时间】:2017-08-05 18:30:46
【问题描述】:
好的,所以我设法使用 html select 创建了一个下拉列表,但问题是,除了白色空白选项之外,它没有显示任何内容。选项的数量和我准备的完全一样,只是我在下拉列表中看不到它的内容。
这是我的 XML
<group name="Housing Type">
<field is_admin_field="N" required="Y">
<question_title>Which of the housing type best describes your residential?</question_title>
<type>List</type>
<db_field_name>which_of_the_housing_type_best_describes_your_residential</db_field_name>
<options>
<item score="0">3 - 5 room HDB</item>
<item score="0">Executive Condominium </item>
<item score="0">Landed 1 Floor</item>
<item score="0">Landed 2 Floor</item>
<item score="0">Landed 3 Floor</item>
<item score="0">Landed 4 Floor</item>
<item score="0">Landed 5 Floor</item>
</options>
<db_field_length>22</db_field_length>
<additional_comment/>
</field>
</group>
这是我的 XSLT。已编辑:现在,我只能看到一个选项。
<xsl:if test="$type='List'">
<select>
<xsl:for-each select="./options">
<option >
<xsl:value-of select="item"/>
</option>
</xsl:for-each>
</select>
</xsl:if>
【问题讨论】: