Hi All,
I have searched the archive and couldn't find anything that can help me with
this issue. Do you have any suggestions?
Thanks in advance.
Regards,
S. Egrub
----- Original Message ----
From: siarom egrub <egrubs(_at_)yahoo(_dot_)com>
To: Mulberry <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Sun, June 13, 2010 6:50:33 PM
Subject: [xsl] Keeping Text Together
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 “<productname>”
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>®</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+======-->
<xsl:template match="productname">
<fo:inline font-size="16pt">
<xsl:choose>
<xsl:when test="child::br">
<fo:block keep-with-next="always">
<xsl:apply-templates/>
</fo:block>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</fo:inline>
</xsl:template>
Thanks in advancw for your help.
Regards,
S. Egrub
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--