]> granicus.if.org Git - apache/commitdiff
prepare for upcoming xalan update
authorAndré Malo <nd@apache.org>
Sun, 2 Feb 2014 19:53:08 +0000 (19:53 +0000)
committerAndré Malo <nd@apache.org>
Sun, 2 Feb 2014 19:53:08 +0000 (19:53 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1563697 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/style/xsl/quickreference.xsl

index 0f2c8bc747c73bad53be262ba8ed58eabdd86e4d..cc14d476bf7b5525764c5b117b741d95115e7e32 100644 (file)
                 <xsl:apply-templates select="$directive/syntax" />
             </a>
         </td>
-        <td>
-            <!-- if the default value contains (at least) one <br />, -->
-            <!-- this probably means that a short explanation follows -->
-            <!-- the actual default value. We cut off the string      -->
-            <!-- after the <br /> so it will not be shown here.       -->
-            <!-- (add the + character instead)                        -->
-            <xsl:variable name="default">
-                <xsl:choose>
-                <xsl:when test="count($directive/default[count(br) &gt; 0])
-                                &gt; 0">
-                    <xsl:value-of
-                        select="$directive/default/child::node()
-                                [count(preceding-sibling::*) = 0]" />
-                </xsl:when>
-                <xsl:otherwise>
-                    <xsl:value-of select="$directive/default"/>
-                </xsl:otherwise>
-                </xsl:choose>
-            </xsl:variable>
 
+        <!-- if the default value contains (at least) one <br />, -->
+        <!-- this probably means that a short explanation follows -->
+        <!-- the actual default value. We cut off the string      -->
+        <!-- after the <br /> so it will not be shown here.       -->
+        <!-- (add the + character instead)                        -->
+        <xsl:variable name="default">
+            <xsl:choose>
+            <xsl:when test="count($directive/default[count(br) &gt; 0])
+                            &gt; 0">
+                <xsl:value-of
+                    select="$directive/default/child::node()
+                            [count(preceding-sibling::*) = 0]" />
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="$directive/default"/>
+            </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+
+        <!-- Now. If the default output is empty, the xslt processor emits -->
+        <!-- <td />. In order to avoid this, we simply emit <td></td>      -->
+        <!-- by ourselves. Crap.                                           -->
+        <xsl:choose>
+        <xsl:when test="not(substring(substring-after(
+                            concat($default, ' '), name),1,20) = '')">
+        <td>
             <xsl:value-of select="substring(substring-after(concat($default,
                                   ' '), name),1,20)" />
+
             <xsl:if test="string-length(substring-after(concat($default, ' '),
                               name)) &gt; 20
                           or count($directive/default[count(br) &gt; 0])
                 <xsl:text> +</xsl:text>
             </xsl:if>
         </td>
+        </xsl:when>
+        <xsl:otherwise>
+            <xsl:text disable-output-escaping="yes">&lt;td>&lt;/td></xsl:text>
+        </xsl:otherwise>
+        </xsl:choose>
+
         <td>
             <xsl:if test="$directive/contextlist/context
                           [normalize-space(.)='server config']">