title: XSLT Generic transform structural value type to single valued string
body: <p>I want to create an xslt transform which transforms a structural based attribute to a single valued string and preferably generic so no reference to named items from the input.</p>
  
  <p>Example input:</p>
  
  <pre><code>&lt;attr attr-name="items"&gt;
          &lt;value type="structured"&gt;
            &lt;component name="studentnummer"&gt;001001&lt;/component&gt;
            &lt;component name="achternaam"&gt;Bimans&lt;/component&gt;
            &lt;component name="voorletters"&gt;L./component&gt;
            &lt;component name="roepnaam"&gt;Leo&lt;/component&gt;
            &lt;component name="geboortedatum"&gt;09-08-1986&lt;/component&gt;
            &lt;component name="geslacht"&gt;V&lt;/component&gt;
            &lt;component name="mobiel_telefoonnummer"&gt;0612345678&lt;/component&gt;
            &lt;component name="voertaal_nl"&gt;Nederlands&lt;/component&gt;
            &lt;component name="voertaal_en"&gt;Dutch&lt;/component&gt;
            &lt;component name="extern_emailadres"&gt;L.Bimans@domain.nl&lt;/component&gt;
          &lt;/value&gt;
          &lt;value type="structured"&gt;
            &lt;component name="studentnummer"&gt;001002&lt;/component&gt;
            &lt;component name="achternaam"&gt;Boels&lt;/component&gt;
            &lt;component name="voorletters"&gt;F.&lt;/component&gt;
            &lt;component name="roepnaam"&gt;Felix&lt;/component&gt;
            &lt;component name="geboortedatum"&gt;04-02-1993&lt;/component&gt;
            &lt;component name="geslacht"&gt;M&lt;/component&gt;
            &lt;component name="voertaal_nl"&gt;Nederlands&lt;/component&gt;
            &lt;component name="voertaal_en"&gt;Dutch&lt;/component&gt;
          &lt;/value&gt;
  &lt;/attr&gt;
  </code></pre>
  
  <p>Should be translated to:</p>
  
  <pre><code>&lt;attr attr-name="items"&gt;
      &lt;value type="string"&gt;#studentnummer#001001#achternaam#Bimans#voorletters#L.#roepnaam#Leo#geboortedatum#09-08-1986#geslacht#V#mobiel_telefoonnummer#0612345678#voertaal_nl#Nederlands#voertaal_en#Dutch#extern_emailadres#L.Bimans@domain.nl&gt;&lt;/value&gt;
      &lt;value type="string"&gt;#studentnummer#001002#achternaam#Boels#voorletters#F.#roepnaam#Felix#geboortedatum#04-02-1993#geslacht#M#voertaal_nl#Nederlands#voertaal_en#Dutch&lt;/value&gt;
  &lt;attr&gt;
  </code></pre>
  
  <p>Another example:</p>
  
  <pre><code>&lt;attr attr-name="links"&gt;
          &lt;value type="structured"&gt;
            &lt;component name="rel"&gt;self&lt;/component&gt;
            &lt;component name="href"&gt;http://192.83.206.98:9999/rds/basis/studenten/&lt;/component&gt;
          &lt;/value&gt;
          &lt;value type="structured"&gt;
            &lt;component name="rel"&gt;edit&lt;/component&gt;
            &lt;component name="href"&gt;http://192.83.206.98:9999/rds/basis/studenten/&lt;/component&gt;
          &lt;/value&gt;
          &lt;value type="structured"&gt;
            &lt;component name="rel"&gt;describedby&lt;/component&gt;
            &lt;component name="href"&gt;http://192.83.206.98:9999/rds/metadata-catalog/basis/studenten/&lt;/component&gt;
          &lt;/value&gt;
  &lt;/attr&gt;
  </code></pre>
  
  <p>Should be translated to:</p>
  
  <pre><code>&lt;attr attr-name="links"&gt;
      &lt;value type="string"&gt;#rel#self#href#http://192.83.206.98:9999/rds/basis/studenten/&lt;/value&gt;
      &lt;value type="string"&gt;#rel#edit#href#http://192.83.206.98:9999/rds/basis/studenten/&lt;/value&gt;
      &lt;value type="string"&gt;#rel#describedby#href#http://192.83.206.98:9999/rds/metadata-catalog/basis/studenten/&lt;/value&gt;
  &lt;/attr&gt;
  </code></pre>
  
  <p>Transformation should be as generic as possible. In other words the same code could be used on both types of input data (if possible). So no references to attributes names, values or whatsoever.
  Please note that the component name (from the structural) should be (preferably) included in the resulting string (as examples show) and after it the actual value should follow (all separated by a seperator character #).</p>
  
  <p>Been trying to accomplish this but no luck up till now.</p>
  
  <p>Also note i can only use xslt 1.0!</p>
  
  <p>Thanks!</p>