title: Create XML element without closing tag using XSLT
body: <p>I need to be able to create XML elements in the following format using XSLT:</p>
  
  <pre><code>&lt;element foo="x" bar="y" /&gt;
  </code></pre>
  
  <p>I seem to be limited to:</p>
  
  <pre><code>&lt;element foo="x" bar="y"&gt;&lt;/element&gt;
  </code></pre>
  
  <p>The reason is we have a process change but the interface to the client cannot change. You may suggest that these are essentially equal and you would be right but we cant, however, assume our clients are using sensible XML parsing techniques.</p>
  
  <p>I have tried:</p>
  
  <pre><code>&lt;Mapping&gt;
     &lt;xsl:attribute name="Source"&gt;
        &lt;xsl:value-of select="@Source"/&gt;
     &lt;/xsl:attribute&gt;
     &lt;xsl:attribute name="Destination"&gt;
        &lt;xsl:value-of select="@Destination"/&gt;
     &lt;/xsl:attribute&gt;
  &lt;/Mapping&gt;
  </code></pre>
  
  <p>which obviously adds the unwanted end tag, and:</p>
  
  <pre><code>&lt;xsl:element name="Mapping"&gt;
     &lt;xsl:attribute name="Source"&gt;
        &lt;xsl:value-of select="@Source"/&gt;
     &lt;/xsl:attribute&gt;
     &lt;xsl:attribute name="Destination"&gt;
        &lt;xsl:value-of select="@Destination"/&gt;
     &lt;/xsl:attribute&gt;
   &lt;/xsl:element&gt;
  </code></pre>
  
  <p>this still added the unwanted end tag.</p>
  
  <p>Can anyone help?</p>