]> granicus.if.org Git - docbook-dsssl/commitdiff
Use U+2592 as an internal marker for linebreak around sbr output
authorMichael Smith <xmldoc@users.sourceforge.net>
Fri, 19 Jan 2007 02:58:50 +0000 (02:58 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Fri, 19 Jan 2007 02:58:50 +0000 (02:58 +0000)
(to prevent the break from getting eaten by some normalization
that the stylesheet does on synopses).
Use U+2580 as an internal marker for no-break space (to work
around a similar issue). Closes bug #1612808. Thanks to Simon
Walter for reporting it (the sbr bug).

xsl/manpages/synop.xsl
xsl/manpages/table.xsl
xsl/manpages/utility.xsl
xsl/params/man.string.subst.map.xml

index f5d92120da0d87afb50c70d2ab8474a5967b072d..2c69f370d7e209190aaa87087cdf30b8a8acb6f7 100644 (file)
@@ -28,7 +28,7 @@
   <xsl:text>(</xsl:text>
   <xsl:value-of select="$snum"/>
   <xsl:text>)</xsl:text>
-  <xsl:text>&#160;</xsl:text>
+  <xsl:text>&#x2580;</xsl:text>
   <xsl:variable name="synopfragmentref">
     <FragRefContents><xsl:value-of select="normalize-space(.)"/></FragRefContents>
   </xsl:variable>
 </xsl:template>
 
 <xsl:template match="sbr">
-  <xsl:text>&#10;</xsl:text>
-  <xsl:text>&#x2302;br&#10;</xsl:text>
+  <xsl:text>&#x2592;</xsl:text>
+  <xsl:text>&#x2302;br&#x2592;</xsl:text>
 </xsl:template>
 
 <xsl:template match="cmdsynopsis">
index a49fda14756519c3b6c3ca0c91ef5158ad2bd94d..921f1487239e99d27913654c96650727055ba155 100644 (file)
         <xsl:value-of select="$tbl.font.title"/>
         <xsl:text> </xsl:text>
         <xsl:if test="parent::td">
-          <xsl:text>*[nested&#160;table]</xsl:text>
+          <xsl:text>*[nested&#x2580;table]</xsl:text>
         </xsl:if>
         <xsl:value-of select="normalize-space($title)"/>
         <xsl:text>&#10;</xsl:text>
               >tbl convert : Extracted a nested table</xsl:text>
             </xsl:with-param>
           </xsl:call-template>
-          <xsl:text>[&#x2593;fInested&#160;table&#x2593;fR]*&#10;</xsl:text>
+          <xsl:text>[&#x2593;fInested&#x2580;table&#x2593;fR]*&#10;</xsl:text>
         </xsl:when>
         <xsl:otherwise>
           <!-- * Apply templates to the child contents of this cell, to -->
index 8c83baaae0d8144c7e37b8fd0355d52b1e5fce3e..8d0df76a6576738d96b9acf08bc16f1fecfb97fe 100644 (file)
     <xsl:call-template name="string.subst">
       <xsl:with-param name="string" select="$content"/>
       <xsl:with-param name="target" select="' '"/>
-      <!-- * We output a real nobreak space here (rather than, "\ ", -->
-      <!-- * the roff nobreak space) because, when we do character-map -->
-      <!-- * processing before final output, the character-map will -->
-      <!-- * handle conversion of the &#160; to "\ " for us -->
-      <xsl:with-param name="replacement" select="'&#160;'"/>
+      <!-- * U+2580 is a "UPPER HALF BLOCK"; we use it here because -->
+      <!-- * if we were to just use a normal space, it would get -->
+      <!-- * replaced when normalization is done. We replace it -->
+      <!-- * later with the groff markup for non-breaking space. -->
+      <xsl:with-param name="replacement" select="'&#x2580;'"/>
     </xsl:call-template>
   </xsl:template>
 
index 999dcaebfe636bd9fab688d32b926009ffd436c5..2af0ff6854fc1f03b723a27bc3b66fe8332f1a08 100644 (file)
   <substitution oldstring="&#x2593;FB" newstring="\fB"/>
   <substitution oldstring="&#x2593;FI" newstring="\fI"/>
   <substitution oldstring="&#x2593;FR" newstring="\fR"/>
+  <!-- * remove no-break marker at beginning of line (stylesheet artifact) --> 
+  <substitution oldstring="&#x2592;&#x2580;" newstring="&#x2592;"/>
+  <!-- * replace U+2580 no-break marker (stylesheet-added) w/ no-break space -->
+  <substitution oldstring="&#x2580;" newstring="\ "/>
   <!-- * replace U+2593 marker with backslash --> 
   <substitution oldstring="&#x2593;" newstring="\"/>
   <!-- * escape dashes in content (only at line beginnings) -->
   <!-- * -->
   <!-- *   Product&#x2122; -> Product(TM) -->
   <substitution oldstring="&#x2122;" newstring="(TM)"/>
+
+  <!-- ==================================================================== -->
+
+  <!-- * we use U+2592 as a marker for the newline before output of <sbr>; -->
+  <!-- * so we now need to replace U+2592 marker with a real newline -->
+  <substitution oldstring="&#x2592;" newstring="&#10;"/>
+
 </xsl:param>
 </src:fragment>
 </refsynopsisdiv>