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] whitespace handling in funcprototype


On Fri, Nov 14, 2003 at 04:11:13PM +0000, Brian McGurk wrote:

> >Yes.  How about this additional template?:
> >
> ><xsl:template match="funcprototype//text()">
> >  <xsl:value-of select="normalize-space()"/>
> >  <xsl:if test="following-sibling::parameter or
> >                following-sibling::function">
> >    <xsl:text> </xsl:text>
> >  </xsl:if>
> ></xsl:template>
> 
> Thanks. That seems to work fine and removes all the hacking on
> multiple (sometimes inappropriate) templates.

Great.  The question now is where it should go: this issue isn't
confined to roff output, but affects all types.  Should we have a copy
of this template in each output type, or should it be somewhere common
to all? 

> Is it possible to use the same kind of approach for the various other
> bits of text that get their whitespace wrongly preserved, listitems in
> varlistentries and itemizedlists, and row entries in tables?
> I tried:
> <xsl:template match="listitem//text()">
>   <xsl:value-of select="normalize-space()"/>
> </xsl:template>
> but that seems to strip whitespace from around function elements in
> the output.

That's a bit too generic because of all the different types of element
that might break up text() nodes.  Even the funcprototype//text()
template might be too much; I haven't looked in detail at what
elements are allowed inside funcprototypes that I haven't considered.

This is what the 'xsl:if test=' bit is about in the quoted template
above.

Tim.
*/

PGP signature



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