]> granicus.if.org Git - docbook-dsssl/commitdiff
Account for a glossary with no glossdiv or glossentry children.
authorBob Stayton <bobs@sagehill.net>
Thu, 16 Aug 2007 20:58:06 +0000 (20:58 +0000)
committerBob Stayton <bobs@sagehill.net>
Thu, 16 Aug 2007 20:58:06 +0000 (20:58 +0000)
xsl/html/glossary.xsl

index 4d5892a618f2c07c367b23e9fce7c33872297913..622fcef363f6015e77c1e070e0c51a5687aa8a8f 100644 (file)
       <xsl:when test="glossdiv">
         <xsl:apply-templates select="(glossdiv[1]/preceding-sibling::*)"/>
       </xsl:when>
-      <xsl:otherwise>
+      <xsl:when test="glossentry">
         <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates/>
       </xsl:otherwise>
     </xsl:choose>
 
@@ -45,7 +48,7 @@
       <xsl:when test="glossdiv">
         <xsl:apply-templates select="glossdiv"/>
       </xsl:when>
-      <xsl:otherwise>
+      <xsl:when test="glossentry">
         <dl>
           <xsl:choose>
             <xsl:when test="$glossary.sort != 0">
@@ -60,6 +63,9 @@
             </xsl:otherwise>
           </xsl:choose>
         </dl>
+      </xsl:when>
+      <xsl:otherwise>
+        <!-- empty glossary -->
       </xsl:otherwise>
     </xsl:choose>