[xsl] Keeping Text Together

Subject: [xsl] Keeping Text Together
From: siarom egrub <egrubs@xxxxxxxxx>
Date: Sun, 13 Jun 2010 18:50:33 -0700 (PDT)
Hi All,

I am trying to keep text in an element/tag together and not separated
across two pages when generated in a PDF using XSL-FO. The text is in
b<productname>b tag in the XML snippet below has a line break tag "<br/>"
-- the text before and after the line break tag should keep-together always;
however, it is breaking across two pages. See example below.
How can I get the
text to keep-together always?

IT IS DISPLAYING/BREAKING ACROSS TWO PAGES LIKE
THIS:

DAT Multiple Low Urine Control
============Page Break=========
DAT
Multiple High Urine Control

THE REQUIRED DISPLAY IS AS FOLLOWS:

DAT Multiple
Low Urine Control
DAT Multiple High Urine Control

<!--======+XML
Snippet+======-->
<productInfo>
<systemname>SYNCHRON<superscript>&#174;</superscript> Systems</systemname>
<productname>DAT Multiple Low Urine Control<br/>DAT Multiple High Urine
Control</productname>
<kitRef><Ref>474979, 474976</Ref></kitRef>
<forUse>For
<emphasis role="bolditalics">In Vitro</emphasis> Diagnostic Use</forUse>
</productInfo>

<!--======+Productname template+======-->B  
<xsl:template
match="productname">
B B B  <fo:inline font-size="16pt">
B B B B B B 
<xsl:choose>
B B B B B B B B B  <xsl:when test="child::br">
B B B B B B B B B B B B B  <fo:block keep-with-next="always">
B B B B B B B B B B B B B B B B  <xsl:apply-templates/>
B B B B B B 
</fo:block>
B B  </xsl:when>
B B  <xsl:otherwise>
B B B B B B 
<xsl:apply-templates/>
B B  </xsl:otherwise>
B B B B B B  </xsl:choose>
B B B 
</fo:inline>
</xsl:template>
B B  
Thanks in advancw for your help.

Regards,
S. Egrub

Current Thread