[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Keeping Text Together

Subject: Keeping Text Together
From: siarom egrub <egrubs@xxxxxxxxx>
Date: Sun, 13 Jun 2010 18:50:33 -0700 (PDT)
 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
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.