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

From
Tim Waugh <>
Date
2003-06-08T21:59:08+00:00
ID
Thread
Re: [docbook-apps] Re: xml/groff: comments in text=>whitespace stripped?!
On Sun, Jun 08, 2003 at 02:04:59PM -0400, Sam Steingold wrote:

> > > 1. apply templates
> > > 2. replace newlines with a special non-white character, e.g. NULL
> > > 3. normalize-space
> > > 4. replace [space NULL] with newline and then [NULL] with newline.
> > > 
> > > Tim, could you please consider this?
> > > 
> > > note that the current XSL/groff style sheets are broken here...
> > 
> > Step 4 looks like it could end up being very slow.
> > 
> > Do you have a suggestion for a reasonable implementation?
> 
> why would 4 be slower than 2?

Because it would need to be recursive.

> what's wrong with:
> 
>   <xsl:call-template name="string.subst">
>    <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
>    <xsl:with-param name="target" select="'&#32;&#0;'"/>
>    <xsl:with-param name="replacement" select="'&#10;'"/>
>   </xsl:call-template>

That would only remove one space, not several spaces.

> PS. note that currently <itemizedlist> nested in a <para> is converted
> into straight text with embedded ".TP o " strings:

Yes, nested lists are broken at the moment, that's true.

Tim.
*/