]> granicus.if.org Git - docbook-dsssl/commitdiff
Handles missing otherterm target in glosssee and glosseealso.
authorBob Stayton <bobs@sagehill.net>
Fri, 13 Dec 2002 09:55:21 +0000 (09:55 +0000)
committerBob Stayton <bobs@sagehill.net>
Fri, 13 Dec 2002 09:55:21 +0000 (09:55 +0000)
xsl/fo/glossary.xsl

index b10f7d63226e79ece72ec90e07091211d479d394..8ed184bf136bb5b5ff3207ef1a1a4d3bedc037b5 100644 (file)
@@ -568,9 +568,16 @@ GlossEntry ::=
       <xsl:with-param name="name" select="'see'"/>
     </xsl:call-template>
     <xsl:choose>
-      <xsl:when test="@otherterm">
+      <xsl:when test="$target">
         <xsl:apply-templates select="$target" mode="xref"/>
       </xsl:when>
+      <xsl:when test="$otherterm != '' and not($target)">
+        <xsl:message>
+          <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text>
+          <xsl:value-of select="$otherterm"/>
+        </xsl:message>
+        <xsl:apply-templates mode="glossary.as.list"/>
+      </xsl:when>
       <xsl:otherwise>
         <xsl:apply-templates mode="glossary.as.list"/>
       </xsl:otherwise>
@@ -605,9 +612,16 @@ GlossEntry ::=
   <xsl:variable name="target" select="$targets[1]"/>
 
   <xsl:choose>
-    <xsl:when test="@otherterm">
+    <xsl:when test="$target">
       <xsl:apply-templates select="$target" mode="xref"/>
     </xsl:when>
+    <xsl:when test="$otherterm != '' and not($target)">
+      <xsl:message>
+        <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text>
+        <xsl:value-of select="$otherterm"/>
+      </xsl:message>
+      <xsl:apply-templates mode="glossary.as.list"/>
+    </xsl:when>
     <xsl:otherwise>
       <xsl:apply-templates mode="glossary.as.list"/>
     </xsl:otherwise>
@@ -685,9 +699,16 @@ GlossEntry ::=
     <xsl:with-param name="name" select="'see'"/>
   </xsl:call-template>
   <xsl:choose>
-    <xsl:when test="@otherterm">
+    <xsl:when test="$target">
       <xsl:apply-templates select="$target" mode="xref"/>
     </xsl:when>
+    <xsl:when test="$otherterm != '' and not($target)">
+      <xsl:message>
+        <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text>
+        <xsl:value-of select="$otherterm"/>
+      </xsl:message>
+      <xsl:apply-templates mode="glossary.as.blocks"/>
+    </xsl:when>
     <xsl:otherwise>
       <xsl:apply-templates mode="glossary.as.blocks"/>
     </xsl:otherwise>
@@ -721,9 +742,16 @@ GlossEntry ::=
   <xsl:variable name="target" select="$targets[1]"/>
 
   <xsl:choose>
-    <xsl:when test="@otherterm">
+    <xsl:when test="$target">
       <xsl:apply-templates select="$target" mode="xref"/>
     </xsl:when>
+    <xsl:when test="$otherterm != '' and not($target)">
+      <xsl:message>
+        <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text>
+        <xsl:value-of select="$otherterm"/>
+      </xsl:message>
+      <xsl:apply-templates mode="glossary.as.blocks"/>
+    </xsl:when>
     <xsl:otherwise>
       <xsl:apply-templates mode="glossary.as.blocks"/>
     </xsl:otherwise>