OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] xml/groff: comments in text=>whitespace stripped?!


On Thu, Jun 05, 2003 at 07:22:50PM -0400, Sam Steingold wrote:
> I asked this question several times, and the silence is deafening.
> please help!
> 
> xsl/groff stylesheet adds newline around comment element:
> 
> <xsl:template match="comment()">
>  <xsl:text>&#10;.&#92;&#34;</xsl:text> <!-- #\Newline . \ " -->
>  <xsl:variable name="content">
>   <xsl:call-template name="string.subst">
>    <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
>    <xsl:with-param name="target" select="'&#10;'"/>
>    <xsl:with-param name="replacement" select="'&#10;.&#92;&#34;'"/>
>   </xsl:call-template>
>  </xsl:variable>
>  <xsl:value-of select="normalize-space($content)"/>
>  <xsl:if test="not(following-sibling::comment())">
>   <xsl:text>&#10;</xsl:text></xsl:if>
> </xsl:template>
> 
> this works fine when the comment is surrounded by tags.
> when the comment is inside text, like here:
> 
> <varlistentry id="opt-libdir"><term><option>-B</option>
>   <replaceable>lisp-lib-dir</replaceable></term>
>  <listitem><simpara>Specifies the installation directory.
>    This is the directory containing the linking sets and other data files.
> <!-- #ifdef UNIX -->
>    This option is normally not necessary, because the installation directory
>    is already built-in in the <command>clisp</command> executable.
> <!-- #endif -->
>    Directory <replaceable>lisp-lib-dir</replaceable> can be changed
>    dynamically using the symbol-macro <varname>*lib-directory*</varname>.
> </simpara></listitem></varlistentry>
> 

The problem lies in the template that processes the simpara,

<xsl:template match="para|simpara|remark" mode="list">

in manpages/lists.xsl.  It processes the simpara content
into a variable:

  <xsl:variable name="foo">
    <xsl:apply-templates/>
  </xsl:variable>

and then processes that variable with normalize-space($foo).
That function eats the line feeds within the simpara.
You are going to have to work around that function.


Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]