This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] whitespace handling in manpages stylesheet


>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.

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.

BTW, why does the listitem//text() in the above template only seem to
match if I wrap the listitems's content in para tags? This doesn't
seem necessary in your "funcprototype//text()" above.

Brian 

To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]