title: How to make drop down list using XSLT?
body: <p>I have tried to make a drop down list for hot text interaction Quiz using XSLT, but it is generated and displayed for an each element. here, i need to display all the values into a drop down. what should i do in the XSLT?</p>
  
  <p><strong>XML:</strong></p>
  
  <pre><code>        &lt;hottextInteraction responseIdentifier="RESPONSE_1" maxChoices="0"&gt;
          &lt;prompt&gt;Hot text multi selection&lt;/prompt&gt;
          &lt;div&gt;
          &lt;p&gt;The
          &lt;hottext identifier="X99999-t01as02asi006asic001"&gt;apple&lt;/hottext&gt;
          &lt;hottext identifier="X99999-t01as02asi006asic002"&gt;pear&lt;/hottext&gt;
          &lt;hottext identifier="X99999-t01as02asi006asic003"&gt;carrot&lt;/hottext&gt;
          &lt;hottext identifier="X99999-t01as02asi006asic004"&gt;potatoe&lt;/hottext&gt; grow on trees.&lt;/p&gt;
          &lt;p&gt;The
          &lt;hottext identifier="X99999-t01as02asi006asic005"&gt;cherry&lt;/hottext&gt;
          &lt;hottext identifier="X99999-t01as02asi006asic006"&gt;watermelon&lt;/hottext&gt;
          &lt;hottext identifier="X99999-t01as02asi006asic007"&gt;orange&lt;/hottext&gt;
          &lt;hottext identifier="X99999-t01as02asi006asic008"&gt;potatoe&lt;/hottext&gt; grow in soil.&lt;/p&gt;
          &lt;/div&gt;
          &lt;/hottextInteraction&gt;
  </code></pre>
  
  <p><strong>XSLT:</strong></p>
  
  <pre><code>    &lt;xsl:template match="//hottextInteraction"&gt;&lt;div class="quizborder"&gt;&lt;xsl:apply-templates /&gt;&lt;/div&gt;&lt;/xsl:template&gt;
      &lt;xsl:template match="//hottext"&gt;&lt;select name="hottext"&gt;&lt;option value="hottext"&gt;&lt;xsl:value-of select="." /&gt;&lt;/option&gt;&lt;/select&gt;&lt;/xsl:template&gt;    
  </code></pre>
  
  <p><strong>OUTPUT:</strong></p>
  
  <pre><code>        &lt;div&gt;
          &lt;div class="quizborder"&gt;
          &lt;p&gt;Hot text multi selection&lt;/p&gt;
          &lt;div&gt;
          The
          &lt;select name="hottext"&gt;&lt;option value="hottext"&gt;apple&lt;/option&gt;&lt;/select&gt;
          &lt;select name="hottext"&gt;&lt;option value="hottext"&gt;pear&lt;/option&gt;&lt;/select&gt;
          &lt;select name="hottext"&gt;&lt;option value="hottext"&gt;carrot&lt;/option&gt;&lt;/select&gt;
          &lt;select name="hottext"&gt;&lt;option value="hottext"&gt;potatoe&lt;/option&gt;&lt;/select&gt; grow on trees.
          The
          &lt;select name="hottext"&gt;&lt;option value="hottext"&gt;cherry&lt;/option&gt;&lt;/select&gt;
          &lt;select name="hottext"&gt;&lt;option value="hottext"&gt;watermelon&lt;/option&gt;&lt;/select&gt;
          &lt;select name="hottext"&gt;&lt;option value="hottext"&gt;orange&lt;/option&gt;&lt;/select&gt;
          &lt;select name="hottext"&gt;&lt;option value="hottext"&gt;potatoe&lt;/option&gt;&lt;/select&gt; grow in&amp;nbsp;soil.
          &lt;/div&gt;
          &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/sgTVR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sgTVR.png" alt="enter image description here"></a></p>
  
  <p>I need the result:</p>
  
  <pre><code>        &lt;div&gt;
          The
          &lt;select name="hottext"&gt;
          &lt;option value="apple"&gt;apple&lt;/option&gt;
          &lt;option value="pear"&gt;pear&lt;/option&gt;
          &lt;option value="carrot"&gt;carrot&lt;/option&gt;
          &lt;option value="potatoe"&gt;potatoe&lt;/option&gt;
          &lt;/select&gt;
          grow on trees.
          The
          &lt;select name="hottext"&gt;
          &lt;option value="cherry"&gt;cherry&lt;/option&gt;
          &lt;option value="watermelon"&gt;watermelon&lt;/option&gt;
          &lt;option value="orange"&gt;orange&lt;/option&gt;
          &lt;option value="potatoe"&gt;potatoe&lt;/option&gt;
          &lt;/select&gt; grow in&amp;nbsp;soil.
          &lt;/div&gt; 
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/TskF2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TskF2.png" alt="enter image description here"></a></p>