<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="xml"/>

<xsl:template match="node() | @*">
 <xsl:choose>
  <xsl:when test="string-length(.)">
   <xsl:copy>
    <xsl:apply-templates select="node() | @*"/>
   </xsl:copy>
  </xsl:when>
  <xsl:otherwise>
   <xsl:element name="{name()}">
    <xsl:text>true</xsl:text>
   </xsl:element>
  </xsl:otherwise>
 </xsl:choose>
</xsl:template>

</xsl:stylesheet>
