]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
filter no-break-spaces in text output. In some environments (e.g. mine)
authorAndré Malo <nd@apache.org>
Mon, 14 Apr 2003 17:50:50 +0000 (17:50 +0000)
committerAndré Malo <nd@apache.org>
Mon, 14 Apr 2003 17:50:50 +0000 (17:50 +0000)
they are not transformed correctly.
This change defines the output to be exactly "&nbsp;" (without quotes)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99354 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/style/xsl/common.xsl
docs/manual/style/xsl/directiveindex.xsl
docs/manual/style/xsl/indexpage.xsl
docs/manual/style/xsl/manualpage.xsl
docs/manual/style/xsl/moduleindex.xsl
docs/manual/style/xsl/quickreference.xsl
docs/manual/style/xsl/sitemap.xsl
docs/manual/style/xsl/synopsis.xsl
docs/manual/style/xsl/util/nbsp.xml [new file with mode: 0644]

index 4fa05dd1f7ad7ddfaf997ac060ff7a127b5020e8..72ef306685fac3effd2b422b6cefa69a5a2f5125 100644 (file)
@@ -1,5 +1,7 @@
 <?xml version="1.0"?>
-<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>
+<!DOCTYPE xsl:stylesheet [
+    <!ENTITY nbsp SYSTEM "util/nbsp.xml">
+]>
 <xsl:stylesheet version="1.0"
               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns="http://www.w3.org/1999/xhtml">
   <!-- /note/title -->
 
 
+  <!--                                                    -->
+  <!-- Filter &#160; in text() nodes.                     -->
+  <!-- In some environments this character won't be       -->
+  <!-- transformed correctly, so we just write it         -->
+  <!-- explicitely as "&nbsp;"                            -->
+  <!--                                                    -->
+  <xsl:template match="text()" name="filter.nbsp">
+  <xsl:param name="text"><xsl:value-of select="."/></xsl:param>
+    <xsl:choose>
+        <xsl:when test="contains($text, '&#160;')">
+            <xsl:value-of select="substring-before($text, '&#160;')"/>
+            &nbsp;
+            <xsl:call-template name="filter.nbsp">
+                <xsl:with-param name="text"
+                              select="substring-after($text, '&#160;')"/>
+            </xsl:call-template>
+        </xsl:when>
+
+        <xsl:otherwise>
+            <xsl:value-of select="$text"/>
+        </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+
   <!--                                                    -->
   <!-- Process everything else by just passing it through -->
   <!--                                                    -->
     </xsl:if>
 
     <a href="#{substring($letters,1,1)}">
-      <xsl:text>&nbsp;</xsl:text>
+      &nbsp;
       <xsl:value-of select="substring($letters,1,1)"/>
-      <xsl:text>&nbsp;</xsl:text>
+      &nbsp;
     </a>
 
     <xsl:if test="string-length($letters) &gt; 1">
   </xsl:template>
   <!-- /module-translatename -->
 
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>
index 7509cc6d1dba495a24a358b8160b335db6a2beb7..e57dd8cc0baef3b7f98836fbe673b746018b7cfe 100644 (file)
@@ -1,5 +1,7 @@
 <?xml version="1.0"?>
-<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>
+<!DOCTYPE xsl:stylesheet [
+    <!ENTITY nbsp SYSTEM "util/nbsp.xml">
+]>
 <xsl:stylesheet version="1.0"
               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns="http://www.w3.org/1999/xhtml">
index dd9d105f86c718a85a379dded04583fe1a054615..2c3b9c7ead86f77e5e728d83ad05e0de35c3d8a2 100644 (file)
@@ -1,5 +1,7 @@
 <?xml version="1.0"?>
-<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>
+<!DOCTYPE xsl:stylesheet [
+    <!ENTITY nbsp SYSTEM "util/nbsp.xml">
+]>
 <xsl:stylesheet version="1.0"
               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns="http://www.w3.org/1999/xhtml">
index af7f2ae81121d6de9e5f9a10ab0899a631c85c25..3ebdef57ae601c12b244d761534fd96dd45c25a7 100644 (file)
@@ -1,5 +1,7 @@
 <?xml version="1.0"?>
-<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>
+<!DOCTYPE xsl:stylesheet [
+    <!ENTITY nbsp SYSTEM "util/nbsp.xml">
+]>
 <xsl:stylesheet version="1.0"
               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns="http://www.w3.org/1999/xhtml">
index b72d232fd8779113da662e6b0aeebc3a17216188..c83005894b3d7762772e1239a3f95dd7dc629c1e 100644 (file)
@@ -1,5 +1,7 @@
 <?xml version="1.0"?>
-<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>
+<!DOCTYPE xsl:stylesheet [
+    <!ENTITY nbsp SYSTEM "util/nbsp.xml">
+]>
 <xsl:stylesheet version="1.0"
               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns="http://www.w3.org/1999/xhtml">
index 2bde3af57bafc3f76e64f9a458b017b03d2496e8..8057f2ca828ea39049529dd12c6cffe196219b78 100644 (file)
@@ -1,5 +1,7 @@
 <?xml version="1.0"?>
-<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>
+<!DOCTYPE xsl:stylesheet [
+    <!ENTITY nbsp SYSTEM "util/nbsp.xml">
+]>
 <xsl:stylesheet version="1.0"
               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns="http://www.w3.org/1999/xhtml">
   </xsl:template>
   <!-- /reference-of-letter -->
 
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>
index c01ffe4d10afe14b61289830cee8b1455f6c0702..a2a842f681a6afd14c6a688b7fb40a0a508cb918 100644 (file)
@@ -1,5 +1,7 @@
 <?xml version="1.0"?>
-<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>
+<!DOCTYPE xsl:stylesheet [
+    <!ENTITY nbsp SYSTEM "util/nbsp.xml">
+]>
 <xsl:stylesheet version="1.0"
               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns="http://www.w3.org/1999/xhtml">
index 990433aad56d5ba3d4b408e01394fb2359342b41..a7ce17347a7a81404243481bbff98a92b97cbe95 100644 (file)
@@ -1,5 +1,7 @@
 <?xml version="1.0"?>
-<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>
+<!DOCTYPE xsl:stylesheet [
+    <!ENTITY nbsp SYSTEM "util/nbsp.xml">
+]>
 <xsl:stylesheet version="1.0"
               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns="http://www.w3.org/1999/xhtml">
diff --git a/docs/manual/style/xsl/util/nbsp.xml b/docs/manual/style/xsl/util/nbsp.xml
new file mode 100644 (file)
index 0000000..e65a989
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>