]> granicus.if.org Git - docbook-dsssl/commitdiff
Display empty elements with /> syntax
authorNorman Walsh <ndw@nwalsh.com>
Mon, 1 Oct 2001 10:10:17 +0000 (10:10 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Mon, 1 Oct 2001 10:10:17 +0000 (10:10 +0000)
litprog/weave.xweb

index d2b027c14519ada40d590226976eeaafdfa18a66..4ab4dfbf01e4672d4a8edceb9a9f3e6043b432f5 100644 (file)
     </xsl:otherwise>
   </xsl:choose>
 
-  <xsl:text>&gt;</xsl:text>
-  <xsl:apply-templates select="node()" mode="copy"/>
-  <xsl:text>&lt;/</xsl:text>
-  <xsl:value-of select="name(.)"/>
-  <xsl:text>&gt;</xsl:text>
+  <xsl:choose>
+    <xsl:when test="node()">
+      <xsl:text>&gt;</xsl:text>
+      <xsl:apply-templates select="node()" mode="copy"/>
+      <xsl:text>&lt;/</xsl:text>
+      <xsl:value-of select="name(.)"/>
+      <xsl:text>&gt;</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>/&gt;</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
 </xsl:template>
 
 <xsl:template match="src:passthrough" mode="copy" priority="3">