title: Transform xml fields to key/value pairs in PI XSLT mapping
body: <p>In SAP PI I have xml files from rest services (web configurator) for which the fields can vary based on the product. For instance product A has a color, a height and a width and product B has a color, a height a width and a depth.</p>
  
  <p>Example incoming XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Order&gt;
      &lt;Products&gt;
          &lt;Product&gt; 
              &lt;Color&gt;Black&lt;/Color&gt;
              &lt;Height&gt;2000&lt;/Height&gt;
              &lt;Width&gt;1000&lt;/Width&gt;
          &lt;/Product&gt;
      &lt;/Products&gt;
  &lt;/Order&gt;
  </code></pre>
  
  <p>To handle this 'generic' I want to convert the fields to some kind of key / value pair structure with an 1.0 XSL transformation.</p>
  
  <p>Example required XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Order&gt;
      &lt;Products&gt;
          &lt;Product&gt; 
              &lt;Var&gt;
                  &lt;VarName&gt;Color&lt;/VarName&gt;
                  &lt;VarValue&gt;Black&lt;/VarValue&gt;
              &lt;/Var&gt;
              &lt;Var&gt;
                  &lt;VarName&gt;Height&lt;/VarName&gt;
                  &lt;VarValue&gt;2000&lt;/VarValue&gt;
              &lt;/Var&gt;
              &lt;Var&gt;
                  &lt;VarName&gt;Width&lt;/VarName&gt;
                  &lt;VarValue&gt;1000&lt;/VarValue&gt;
              &lt;/Var&gt;
          &lt;/Product&gt;
      &lt;/Products&gt;
  &lt;/Order&gt;
  </code></pre>
  
  <p>I've found an article which describes it the other way around
  <a href="https://stackoverflow.com/questions/46502687/xslt-convert-name-value-pair-and-transform-an-xml">XSLT: Convert Name/Value pair and transform an XML</a></p>