2017-03-15 3 views
0

これで、html selectを使用してドロップダウンリストを作成できましたが、白い空白のオプションを除いて何も表示されません。オプションの数は、私が準備したものとまったく同じです。そのドロップダウンリストの内容を見ることはできません。ドロップダウンリストにはコンテンツが表示されず空白が含まれていますXSLT

はここにここに私のXSLTである私の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> 

です。編集:現在、私はただ一つのオプションを見ることができます。

<xsl:if test="$type='List'"> 


     <select> 
      <xsl:for-each select="./options"> 
      <option > 
      <xsl:value-of select="item"/> 

      </option> 

      </xsl:for-each> 
     </select> 



    </xsl:if> 

答えて

0

「。」を削除してみます。 hereと記述されているセレクタは、現在のノードを選択するのとほぼ同じ方法で選択します。ファイルシステムパスで現在のフォルダを選択します。

は、私が何かを変え

<xsl:if test="$type='List'"> 
    <xsl:for-each select="options"> 

    <select> 
     <xsl:for-each select="item"> 
     <option > 
     <xsl:value-of select="item"/> 

     </option> 

     </xsl:for-each> 
    </select> 


    </xsl:for-each> 
</xsl:if> 
+0

を使用してみてください。私の最初の投稿を確認してください。 –

関連する問題