]> granicus.if.org Git - docbook-dsssl/commitdiff
Reworked test in gentext.template; should have no user-visible changes
authorNorman Walsh <ndw@nwalsh.com>
Sun, 12 May 2002 11:28:04 +0000 (11:28 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sun, 12 May 2002 11:28:04 +0000 (11:28 +0000)
xsl/common/l10n.xsl

index 9831cc19b2b262bdb56f53a384b8d1314bd3ab73..768587f4374c5245c231c6f93ec70a114bcbc87c 100644 (file)
   <xsl:variable name="template.node"
                 select="$context.node/l:template[@name=$name][1]"/>
 
-  <xsl:if test="count($template.node) = 0
-                and count($local.template.node) = 0">
-    <xsl:message>
-      <xsl:text>No template named "</xsl:text>
-      <xsl:value-of select="$name"/>
-      <xsl:text>" exists in the context named "</xsl:text>
-      <xsl:value-of select="$context"/>
-      <xsl:text>" in the "</xsl:text>
-      <xsl:value-of select="$lang"/>
-      <xsl:text>" localization.</xsl:text>
-    </xsl:message>
-  </xsl:if>
-
   <xsl:choose>
     <xsl:when test="$local.template.node">
       <xsl:value-of select="$local.template.node/@text"/>
     </xsl:when>
-    <xsl:otherwise>
+    <xsl:when test="$template.node/@text">
       <xsl:value-of select="$template.node/@text"/>
+    </xsl:when>
+<!-- I'm not sure this is a good idea ...
+    <xsl:when test="$context = 'xref'">
+      <xsl:text>%t</xsl:text>
+    </xsl:when>
+-->
+    <xsl:otherwise>
+      <xsl:message>
+        <xsl:text>No template named "</xsl:text>
+        <xsl:value-of select="$name"/>
+        <xsl:text>" exists in the context named "</xsl:text>
+        <xsl:value-of select="$context"/>
+        <xsl:text>" in the "</xsl:text>
+        <xsl:value-of select="$lang"/>
+        <xsl:text>" localization.</xsl:text>
+      </xsl:message>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>