]> granicus.if.org Git - docbook-dsssl/commitdiff
Fix Xalan date-time bug.
authorBob Stayton <bobs@sagehill.net>
Fri, 17 Sep 2004 16:45:48 +0000 (16:45 +0000)
committerBob Stayton <bobs@sagehill.net>
Fri, 17 Sep 2004 16:45:48 +0000 (16:45 +0000)
xsl/common/pi.xsl

index ef3bacdfd6ba0ff3c97daaeaff9be39567e00dd1..3a4efd72f9dc06add08964c38dbb2ae0988d6a46 100644 (file)
   </xsl:variable>
 
   <xsl:variable name="date">
-    <xsl:if test="function-available('date:date-time')">
-      <xsl:value-of select="date:date-time()"/>
-    </xsl:if>
+    <xsl:choose>
+      <xsl:when test="function-available('date:date-time')">
+        <xsl:value-of select="date:date-time()"/>
+      </xsl:when>
+      <xsl:when test="function-available('date:dateTime')">
+        <!-- Xalan quirk -->
+        <xsl:value-of select="date:dateTime()"/>
+      </xsl:when>
+    </xsl:choose>
   </xsl:variable>
 
   <xsl:choose>
-    <xsl:when test="function-available('date:date-time')">
+    <xsl:when test="function-available('date:date-time') or
+                    function-available('date:dateTime')">
       <xsl:call-template name="datetime.format">
         <xsl:with-param name="date" select="$date"/>
         <xsl:with-param name="format" select="$format"/>