title: How to select multiple in value-of select XSLT to correct html?
body: <p>I want to convert my xml to xslt, but i have some problems...</p>
  
  <p>Fisrt, I found how do to it. I selected one block, then I wanted the second block of my xml, but xslt couldn't be two select in one "for-each"...</p>
  
  <p>This is my xml:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;T24 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.temenos.com/T24/OFSML/130" xsi:schemaLocation="http://www.temenos.com/T24/OFSML/130 ofsml.xsd"&gt;
  &lt;ofsmlHeader&gt;
  &lt;requestId&gt;1916951766.00&lt;/requestId&gt;
  &lt;requestTimeStamp&gt;2015-NOV-10T14:22:46Z&lt;/requestTimeStamp&gt;
  &lt;requestExpiryTime&gt;P0Y0M1DT0H0M0S&lt;/requestExpiryTime&gt;
  &lt;/ofsmlHeader&gt;
  &lt;serviceResponse&gt;
  &lt;ofsReport docType="SECTOR.TEST"&gt;
  &lt;dataSet name="SECTOR.TEST"&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;1000&lt;/field&gt;
  &lt;field index="2"&gt;Individuals&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;2100&lt;/field&gt;
  &lt;field index="2"&gt;Central authorities&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;2200&lt;/field&gt;
  &lt;field index="2"&gt;Local authorities&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;2300&lt;/field&gt;
  &lt;field index="2"&gt;Local administration&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;3100&lt;/field&gt;
  &lt;field index="2"&gt;Budget organisation&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;3120&lt;/field&gt;
  &lt;field index="2"&gt;Special budg. org.&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;3150&lt;/field&gt;
  &lt;field index="2"&gt;Fonds budg. org.&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;3170&lt;/field&gt;
  &lt;field index="2"&gt;Impl. from grants&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;3180&lt;/field&gt;
  &lt;field index="2"&gt;Impl. from loans&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;3200&lt;/field&gt;
  &lt;field index="2"&gt;Municipalities&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;3300&lt;/field&gt;
  &lt;field index="2"&gt;Comm. org. with gov&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;3400&lt;/field&gt;
  &lt;field index="2"&gt;Comm. org.&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;3500&lt;/field&gt;
  &lt;field index="2"&gt;Cooperative&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;4100&lt;/field&gt;
  &lt;field index="2"&gt;Central bank&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;4200&lt;/field&gt;
  &lt;field index="2"&gt;Not affil. Bank&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;4300&lt;/field&gt;
  &lt;field index="2"&gt;Affil. bank&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;4400&lt;/field&gt;
  &lt;field index="2"&gt;Finance org&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;5100&lt;/field&gt;
  &lt;field index="2"&gt;Social security&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;5200&lt;/field&gt;
  &lt;field index="2"&gt;Med. Insur. Company&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;6100&lt;/field&gt;
  &lt;field index="2"&gt;Enterpren.&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;7100&lt;/field&gt;
  &lt;field index="2"&gt;Non commercial org&lt;/field&gt;
  &lt;/record&gt;
  &lt;record&gt;
  &lt;field index="1"&gt;9999&lt;/field&gt;
  &lt;field index="2"&gt;Other&lt;/field&gt;
  &lt;/record&gt;
  &lt;/dataSet&gt;
  &lt;/ofsReport&gt;
  &lt;/serviceResponse&gt;
  &lt;/T24&gt;
  </code></pre>
  
  <p>You can see my first xsl-file:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
      &lt;xsl:template match="/"&gt;
          &lt;html&gt;
              &lt;body&gt;
                  &lt;table cellSpacing="0" cellPadding="0" border="1"&gt;
                      &lt;tr bgcolor="#AAAAAA"&gt;
                          &lt;th style="font-weight:bold;padding:1px;"&gt;Id&lt;/th&gt;
                          &lt;th style="font-weight:bold;padding:1px;"&gt;TimeStamp&lt;/th&gt;
                          &lt;th style="font-weight:bold;text-align:1px;"&gt;ExpiryTime&lt;/th&gt;
                      &lt;/tr&gt;
                  &lt;xsl:for-each select="ofsmlHeader"&gt;
                      &lt;tr&gt;
                          &lt;td style="padding:3px;"&gt;&lt;xsl:value-of select="requestId"/&gt;&lt;/td&gt;
                          &lt;td style="padding:3px;"&gt;&lt;xsl:value-of select="requestTimeStamp" /&gt;&lt;/td&gt;        
                          &lt;td style="padding:3px;"&gt;&lt;xsl:value-of select="requestExpiryTime" /&gt;&lt;/td&gt;       
                      &lt;/tr&gt;   
                  &lt;/xsl:for-each&gt;
  &lt;tr&gt;&lt;td colspan="3"&gt;&lt;table cellSpacing="0" cellPadding="0" border="1"&gt;
                      &lt;tr bgcolor="#AAAAAA"&gt;
                          &lt;th style="font-weight:bold;padding: 5px;"&gt;SECTOR.CODE&lt;/th&gt;
                          &lt;th style="font-weight:bold;padding:5px;"&gt;DESCRIPTION&lt;/th&gt;
                      &lt;/tr&gt;
  
                  &lt;xsl:for-each select="serviceResponse/ofsReport/dataSet/record"&gt;
                      &lt;tr&gt;
                          &lt;td&gt;&lt;xsl:value-of select="field[@index='1']"/&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;xsl:value-of select="field[@index='2']"/&gt;&lt;/td&gt;         
                      &lt;/tr&gt;   
                  &lt;/xsl:for-each&gt;&lt;/td&gt;&lt;/tr&gt;
                  &lt;/table&gt;
              &lt;/body&gt;
          &lt;/html&gt;
      &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>The final version should be like that:</p>
  
  <pre><code>    &lt;table cellSpacing="0" cellPadding="0" border="1"&gt;
                              &lt;tr bgcolor="#AAAAAA"&gt;
                                  &lt;th style="font-weight:bold;padding:1px;"&gt;Id&lt;/th&gt;
                                  &lt;th style="font-weight:bold;padding:1px;"&gt;TimeStamp&lt;/th&gt;
                                  &lt;th style="font-weight:bold;text-align:1px;"&gt;ExpiryTime&lt;/th&gt;
                              &lt;/tr&gt;
                              &lt;tr&gt;
                                  &lt;td style="padding:3px;"&gt;1916951766.00&lt;/td&gt;
                                  &lt;td style="padding:3px;"&gt;2015-NOV-10T14:22:46Z&lt;/td&gt;     
                                  &lt;td style="padding:3px;"&gt;P0Y0M1DT0H0M0S&lt;/td&gt;        
                              &lt;/tr&gt;
     &lt;/table&gt;&lt;br /&gt;   
     &lt;table cellSpacing="0" cellPadding="0" border="1"&gt;
                              &lt;tr bgcolor="#AAAAAA"&gt;
                                  &lt;th style="font-weight:bold;padding: 5px;"&gt;SECTOR.CODE&lt;/th&gt;
                                  &lt;th style="font-weight:bold;padding:5px;"&gt;DESCRIPTION&lt;/th&gt;
                              &lt;/tr&gt;
  
                              &lt;tr&gt;1000&lt;/td&gt;
                                  &lt;td&gt;Individulals&lt;/td&gt;           
                              &lt;/tr&gt;
                              .............
                              &lt;tr&gt;9999&lt;/td&gt;
                                  &lt;td&gt;Other&lt;/td&gt;          
                              &lt;/tr&gt;
         &lt;/table&gt;
  </code></pre>
  
  <p>Then I remake the second line in my xml:</p>
  
  <pre><code>&lt;T24 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.temenos.com/T24/OFSML/130" xsi:schemaLocation="http://www.temenos.com/T24/OFSML/130 ofsml.xsd"&gt;
  </code></pre>
  
  <p>To: <code>&lt;T24&gt;</code>, but it will be better if xml is unchangeable...</p>
  
  <p>Now this is my xsl, but it displays only first record in the second table... It musts display list of records. Please can someone help me out with the correct XSLT. </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;xsl:output method="html" version="4.0" encoding="UTF-8" indent="yes"/&gt;
  
  &lt;xsl:template match="/"&gt;
          &lt;html&gt;
              &lt;body&gt;&lt;xsl:for-each select="T24"&gt;
                                  &lt;table cellSpacing="0" cellPadding="0" border="1"&gt;
                      &lt;tr bgcolor="#AAAAAA"&gt;
                          &lt;th style="font-weight:bold;padding:1px;"&gt;Id&lt;/th&gt;
                          &lt;th style="font-weight:bold;padding:1px;"&gt;TimeStamp&lt;/th&gt;
                          &lt;th style="font-weight:bold;text-align:1px;"&gt;ExpiryTime&lt;/th&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td style="padding:3px;"&gt;&lt;xsl:value-of select="ofsmlHeader/requestId"/&gt;&lt;/td&gt;
                          &lt;td style="padding:3px;"&gt;&lt;xsl:value-of select="ofsmlHeader/requestTimeStamp" /&gt;&lt;/td&gt;        
                          &lt;td style="padding:3px;"&gt;&lt;xsl:value-of select="ofsmlHeader/requestExpiryTime" /&gt;&lt;/td&gt;       
                      &lt;/tr&gt;
                                  &lt;/table&gt;&lt;br /&gt;  
                  &lt;table cellSpacing="0" cellPadding="0" border="1"&gt;
                      &lt;tr bgcolor="#AAAAAA"&gt;
                          &lt;th style="font-weight:bold;padding: 5px;"&gt;SECTOR.CODE&lt;/th&gt;
                          &lt;th style="font-weight:bold;padding:5px;"&gt;DESCRIPTION&lt;/th&gt;
                      &lt;/tr&gt;
  
                      &lt;tr&gt;
                          &lt;td&gt;&lt;xsl:value-of select="serviceResponse/ofsReport/dataSet/record/field[@index='1']"/&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;xsl:value-of select="serviceResponse/ofsReport/dataSet/record/field[@index='2']"/&gt;&lt;/td&gt;            
                      &lt;/tr&gt;  
                  &lt;/table&gt;
                               &lt;/xsl:for-each&gt;    
              &lt;/body&gt;
          &lt;/html&gt;
      &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>Bests regards, Yaroslav</p>