At 2008-01-02 13:45 +0100, Mati Hadi wrote:
>I have a problem with short and long titles.
>when the title is short, I want that it will be
>in the same line as paragraph
><fo:inline>
><xsl:value-of select="title"/>
><xsl:value-of select="paragraph"/>
></fo:inline>
>
>But when the titles are long, I want that they will
>be on a block-level
><fo:block>
><xsl:value-of select="tilte"/>
></fo:block>
><fo:block>
><xsl:value-of select="paragraph"/>
></fo:block>
>
>This is an example of how the desired result will be:
>
>Short Tiltle here begines the paragraph
>Long TItle Long TItle
> here begines the paragraph
>
>
>Thank you for Helping
>Matilda Kapro
I have had to support this for one of my customers and my
understanding is that the above requirement can only be met with
standard XSL-FO by using an inline-container ... unfortunately XEP
does not support inline-containers so I believe it cannot be done
with XEP. Someone might be aware of an extension that would help.
The idea is that the title and the container are inline-constructs
aligned on the first line using a leader, unless they don't
fit. When they don't fit, the container is end-aligned by the
expanded leader. The container then contains the blocks of your paragraphs.
The code below would be an example of how to get the effect you
want. I've used different backgrounds to reveal which blocks are
where on the page (which is a helpful debugging technique).
I realize this is of limited help, but I hope it is useful.
. . . . . . . . . . Ken
<?xml version="1.0" encoding="US-ASCII"?><!--dlist2.fo-->
<root xmlns="http://www.w3.org/1999/XSL/Format"
font-family="Times" font-size="20pt">
<layout-master-set>
<simple-page-master master-name="frame"
page-height="297mm" page-width="210mm"
margin-top="15mm" margin-bottom="15mm"
margin-left="15mm" margin-right="15mm">
<region-body region-name="frame-body"/>
</simple-page-master>
</layout-master-set>
<page-sequence master-reference="frame">
<flow flow-name="frame-body">
<block end-indent="6cm">
<block>
This is a test with containers where the definition is
start-aligned:
</block>
<block background-color="silver"
text-align-last="justify">
Short title
<inline keep-together.within-line="always">
<leader/>
<inline-container width="6cm" keep-together="auto">
<block end-indent="0pt" text-align-last="start"
background-color="white">
<block>
Here begins a long paragraph associated with this
particular title
</block>
<block>
Here begins a long paragraph associated with this
particular title
</block>
</block>
</inline-container>
</inline>
</block>
<block background-color="silver"
text-align-last="justify">
Long title long title long title
<inline keep-together.within-line="always">
<leader/>
<inline-container width="6cm" keep-together="auto">
<block end-indent="0pt" text-align-last="start"
background-color="white">
<block>
Here begins a long paragraph associated with this
particular title
</block>
<block>
Here begins a long paragraph associated with this
particular title
</block>
</block>
</inline-container>
</inline>
</block>
</block>
</flow>
</page-sequence>
</root>
-- Comprehensive in-depth XSLT2/XSL-FO1.1 classes: Austin TX,Jan-2008 World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@CraneSoftwrights.com Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/f/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal ------------------- (*) To unsubscribe, send a message with words 'unsubscribe xep-support' in the body of the message to majordomo@renderx.com from the address you are subscribed from. (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.htmlReceived on Wed Jan 2 07:54:58 2008
This archive was generated by hypermail 2.1.8 : Wed Jan 02 2008 - 07:54:59 PST