]> granicus.if.org Git - docbook-dsssl/commitdiff
Fix title-end punctuation problems on formalparas
authorNorman Walsh <ndw@nwalsh.com>
Sat, 21 Jul 2001 14:32:31 +0000 (14:32 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sat, 21 Jul 2001 14:32:31 +0000 (14:32 +0000)
xsl/fo/block.xsl
xsl/fo/param.xsl
xsl/html/block.xsl
xsl/html/param.xsl

index 589fab45fdca0fbb4a970c61d1d91bf56e8c25a4..2417c83cece6f2ea1547ddc8d69e21c123188301 100644 (file)
 </xsl:template>
 
 <xsl:template match="formalpara/title">
+  <xsl:variable name="titleStr" select="."/>
+  <xsl:variable name="lastChar">
+    <xsl:if test="$titleStr != ''">
+      <xsl:value-of select="substring($titleStr,string-length($titleStr),1)"/>
+    </xsl:if>
+  </xsl:variable>
+
   <fo:inline font-weight="bold"
              keep-with-next.within-line="always"
              padding-end="1em">
     <xsl:apply-templates/>
+    <xsl:if test="$lastChar != ''
+                  and not(contains($runinhead.title.end.punct, $lastChar))">
+      <xsl:value-of select="$runinhead.default.title.end.punct"/>
+    </xsl:if>
+    <xsl:text>&#160;</xsl:text>
   </fo:inline>
 </xsl:template>
 
index e66c2f35a33135c4c4ef1e87200ed39556f9c9a9..9e85993f0326577eaa7f649a84e397d02c62b6da 100644 (file)
@@ -1241,5 +1241,27 @@ Otherwise, nested fo:blocks will be used.
 </refdescription>
 </doc:param>
 
+<!-- ==================================================================== -->
+<xsl:param name="runinhead.title.end.punct" select="'.!?:'" doc:type='string'/>
+
+<doc:param name="runinhead.title.end.punct" xmlns="">
+<refpurpose>Characters that count as punctuation on a run-in-head</refpurpose>
+<refdescription>
+<para>FIXME:
+</para>
+</refdescription>
+</doc:param>
+
+<!-- ==================================================================== -->
+<xsl:param name="runinhead.default.title.end.punct" select="'.'" doc:type='string'/>
+
+<doc:param name="runinhead.default.title.end.punct" xmlns="">
+<refpurpose>Default punctuation character on a run-in-head</refpurpose>
+<refdescription>
+<para>FIXME:
+</para>
+</refdescription>
+</doc:param>
+
 </xsl:stylesheet>
 
index ae6097be9823026f3df52581c0279be8f669f0e4..815ac868b22510ffcb0af320f8f8b39b4a7be72a 100644 (file)
 </xsl:template>
 
 <xsl:template match="formalpara/title">
-  <b><xsl:apply-templates/></b>
-  <xsl:call-template name="gentext.space"/>
+  <xsl:variable name="titleStr" select="."/>
+  <xsl:variable name="lastChar">
+    <xsl:if test="$titleStr != ''">
+      <xsl:value-of select="substring($titleStr,string-length($titleStr),1)"/>
+    </xsl:if>
+  </xsl:variable>
+
+  <b>
+    <xsl:apply-templates/>
+    <xsl:if test="$lastChar != ''
+                  and not(contains($runinhead.title.end.punct, $lastChar))">
+      <xsl:value-of select="$runinhead.default.title.end.punct"/>
+    </xsl:if>
+    <xsl:text>&#160;</xsl:text>
+  </b>
 </xsl:template>
 
 <xsl:template match="formalpara/para">
index 12627c3ef687eac12c9817dde4257ab7056f5849..8378033f87127fe21b891194b55e0159b45a6111 100644 (file)
@@ -1188,4 +1188,26 @@ will be passed through to the HTML as a class attribute on a
 </refdescription>
 </doc:param>
 
+<!-- ==================================================================== -->
+<xsl:param name="runinhead.title.end.punct" select="'.!?:'" doc:type='string'/>
+
+<doc:param name="runinhead.title.end.punct" xmlns="">
+<refpurpose>Characters that count as punctuation on a run-in-head</refpurpose>
+<refdescription>
+<para>FIXME:
+</para>
+</refdescription>
+</doc:param>
+
+<!-- ==================================================================== -->
+<xsl:param name="runinhead.default.title.end.punct" select="'.'" doc:type='string'/>
+
+<doc:param name="runinhead.default.title.end.punct" xmlns="">
+<refpurpose>Default punctuation character on a run-in-head</refpurpose>
+<refdescription>
+<para>FIXME:
+</para>
+</refdescription>
+</doc:param>
+
 </xsl:stylesheet>