title: Generating xml from text file
body: <p>I need to generate a well formatted XML structure from the text file, using xslt. I am a newbie to xslt transformation and this looks a bit challenging for me. 
  The sample text file is as follows. I need to omit the first portion and map the value in quotes to the output xml file. </p>
  
  <pre><code>Directory:    sample/archive
  Name:         20130613-T210002.TXT
  ---------------------------------------------------------------
  "11FCK1GR0026" "G190" "FPB - OK Ship Pt" "A" "11" "XX" "02"
  "11FCA1GR0034" "G980" "FPB -San Antonio" "A" "11" "XX" "02"
  "11FCA1GR0034" "G160" "FPB -San Antonio" "A" "11" "XX" "02"
  </code></pre>
  
  <p>Below is the desired Output xml format:</p>
  
  <pre><code>&lt;Account&gt;
      &lt;Action&gt;A&lt;/Action&gt; &lt;!-- 3rd element in the row--&gt;
      &lt;org&gt;G190&lt;/org&gt; &lt;!-- 2nd element--&gt;
      &lt;code&gt;11FCK1GR002611XX&lt;/code&gt; &lt;!--concat(1st element, 4th element, 5th element)--&gt;  
      &lt;FiscalYear&gt;2013&lt;/FiscalYear&gt; &lt;!--calculate fiscal year from current date --&gt;
      &lt;Info&gt;
          &lt;Action&gt;A&lt;/Action&gt; &lt;!-- 3rd element in the row--&gt;
          &lt;org&gt;G190&lt;/org&gt; &lt;!-- 2nd element--&gt;
          &lt;code&gt;11FCK1GR002611XX&lt;/code&gt;&lt;!--concat(1st element, 4th element, 5th element)--&gt;
          &lt;Fieldlab&gt;Acc1&lt;/Fieldlab&gt; &lt;!-- Static value--&gt;
          &lt;FieldVal&gt;11FCK1GR0026 &lt;/FieldVal&gt; &lt;!-- if field order is 1, map 1st element --&gt;
          &lt;FieldOrd&gt;1&lt;/FieldOrd&gt; &lt;!-- Static value--&gt;
      &lt;Info&gt;
      &lt;Info&gt;
          &lt;Action&gt;A&lt;/Action&gt;
          &lt;org&gt;G190&lt;/org&gt; 
          &lt;code&gt;11FCK1GR002611XX&lt;/code&gt;
          &lt;Fieldlab&gt;Acc2&lt;/Fieldlab&gt;
          &lt;FieldVal&gt;11&lt;/FieldVal&gt;  &lt;!-- if field order is 2, map 5th element --&gt;
          &lt;FieldOrd&gt;2&lt;/FieldOrd&gt;
      &lt;Info&gt;
      &lt;Info&gt;
          &lt;Action&gt;A&lt;/Action&gt; &lt;!-- 4th element in the row--&gt;
          &lt;org&gt;G190&lt;/org&gt; &lt;!-- 2nd element--&gt;
          &lt;code&gt;11FCK1GR002611XX&lt;/code&gt;
          &lt;Fieldlab&gt;Acc3&lt;/Fieldlab&gt;
          &lt;FieldVal&gt;xx&lt;/FieldVal&gt; &lt;!-- if field order is 3, map 6th element --&gt;
          &lt;FieldOrd&gt;3&lt;/FieldOrd&gt;
      &lt;Info&gt;
      &lt;Info&gt;
          &lt;Action&gt;A&lt;/Action&gt; &lt;!-- 4th element in the row--&gt;
          &lt;org&gt;G190&lt;/org&gt; &lt;!-- 2nd element--&gt;
          &lt;code&gt;11FCK1GR002611XX&lt;/code&gt;
          &lt;Fieldlab&gt;Acc4&lt;/Fieldlab&gt;
          &lt;FieldVal&gt;02&lt;/FieldVal&gt; &lt;!-- if field order is 4, map 7th element --&gt;
          &lt;FieldOrd&gt;4&lt;/FieldOrd&gt;
      &lt;Info&gt;
      &lt;Info&gt;
          &lt;Action&gt;A&lt;/Action&gt; &lt;!-- 4th element in the row--&gt;
          &lt;org&gt;G190&lt;/org&gt; &lt;!-- 2nd element--&gt;
          &lt;code&gt;11FCK1GR002611XX&lt;/code&gt;
          &lt;Fieldlab&gt;Acc5&lt;/Fieldlab&gt;
          &lt;FieldVal&gt;FPB - OK Ship Pt&lt;/FieldVal&gt; &lt;!-- if field order is 5, map 3rd element --&gt;
          &lt;FieldOrd&gt;5&lt;/FieldOrd&gt;
      &lt;Info&gt;
  
  &lt;/Account&gt;
  &lt;Account&gt;
      &lt;Action&gt;A&lt;/Action&gt; &lt;!-- 3rd element in the row--&gt;
      &lt;org&gt;G980&lt;/org&gt; &lt;!-- 2nd element--&gt;
      &lt;code&gt;111FCA1GR003411XX&lt;/code&gt; &lt;!--concat(1st element, 4th element, 5th element)--&gt; 
      &lt;FiscalYear&gt;2013&lt;/FiscalYear&gt;
      &lt;Info&gt;
          &lt;Action&gt;A&lt;/Action&gt; &lt;!-- 3rd element in the row--&gt;
          &lt;org&gt;G190&lt;/org&gt; &lt;!-- 2nd element--&gt;
          &lt;code&gt;111FCA1GR003411XX&lt;/code&gt;&lt;!--concat(1st element, 4th element, 5th element)--&gt;
          &lt;Fieldlab&gt;Acc1&lt;/Fieldlab&gt;
          &lt;FieldVal&gt;11FCA1GR0034&lt;/FieldVal&gt; &lt;!-- if field order is 1, map 1st element --&gt;
          &lt;FieldOrd&gt;1&lt;/FieldOrd&gt; 
      &lt;Info&gt;
      &lt;Info&gt;
          &lt;Action&gt;A&lt;/Action&gt;
          &lt;org&gt;G190&lt;/org&gt; 
          &lt;code&gt;111FCA1GR003411XX&lt;/code&gt;
          &lt;Fieldlab&gt;Acc2&lt;/Fieldlab&gt;
          &lt;FieldVal&gt;11&lt;/FieldVal&gt;  &lt;!-- if field order is 2, map 5th element --&gt;
          &lt;FieldOrd&gt;2&lt;/FieldOrd&gt;
      &lt;Info&gt;
      &lt;Info&gt;
          &lt;Action&gt;A&lt;/Action&gt; &lt;!-- 4th element in the row--&gt;
          &lt;org&gt;G190&lt;/org&gt; &lt;!-- 2nd element--&gt;
          &lt;code&gt;111FCA1GR003411XX&lt;/code&gt;
          &lt;Fieldlab&gt;Acc3&lt;/Fieldlab&gt;
          &lt;FieldVal&gt;xx&lt;/FieldVal&gt; &lt;!-- if field order is 3, map 6th element --&gt;
          &lt;FieldOrd&gt;3&lt;/FieldOrd&gt;
      &lt;Info&gt;
      &lt;Info&gt;
          &lt;Action&gt;A&lt;/Action&gt; &lt;!-- 4th element in the row--&gt;
          &lt;org&gt;G190&lt;/org&gt; &lt;!-- 2nd element--&gt;
          &lt;code&gt;111FCA1GR003411XX&lt;/code&gt;
          &lt;Fieldlab&gt;Acc4&lt;/Fieldlab&gt;
          &lt;FieldVal&gt;02&lt;/FieldVal&gt; &lt;!-- if field order is 4, map 7th element --&gt;
          &lt;FieldOrd&gt;4&lt;/FieldOrd&gt;
      &lt;Info&gt;
      &lt;Info&gt;
          &lt;Action&gt;A&lt;/Action&gt; &lt;!-- 4th element in the row--&gt;
          &lt;org&gt;G190&lt;/org&gt; &lt;!-- 2nd element--&gt;
          &lt;code&gt;111FCA1GR003411XX&lt;/code&gt;
          &lt;Fieldlab&gt;Acc5&lt;/Fieldlab&gt;
          &lt;FieldVal&gt;FPB -San Antonio&lt;/FieldVal&gt; &lt;!-- if field order is 5, map 3rd element --&gt;
          &lt;FieldOrd&gt;5&lt;/FieldOrd&gt;
      &lt;Info&gt;
  &lt;/Account&gt;
  </code></pre>
  
  <p>Could anybody help me to generate this file. Thanks in advance!</p>