AW: AW: AW: [xep-support] XSLFO: trouble with text-align-last="justify" and linefeed-treatment="preserve"

From: Kirch Fritz <Friedrich.Kirch@it2media.de>
Date: Mon Jan 21 2008 - 09:45:08 PST

May be the nature of the problem lies in the nature of the XML

My XML is:

<AddressList>
<Address>
  <name>a very long text having CRLF characters</name>
  <phonenumber>12345</phonenumber>
</Address>
<Address>
  <name>short text</name>
  <phonenumber>12345</phonenumber>
</Address>
</AddressList>

Some name nodes have text with CarriageReturn+Linefeed characters, other name nodes are short and don't have CRLF characters. So, for me as a XSLT/XSLFO newbie, it was the first and simplest solution to use a block with linefeed-treatment="preserve" and text-align-last=justify".

OK. If you consider this as not being a XSLFO problem than it is a XSLT problem (at least a problem for me). I understand that I have to split the name nodes at CRLF to build separate blocks (without justification) as long as there is a CRLF in the name nodes text. When I finally have reached a name node text without a CRLF I can use a block with justification.

Do you have at least an example how to tokenize the name node texts at CRLF with XSLF 1.0 in order to build my blocks as intended?

Fritz

-----Ursprüngliche Nachricht-----
Von: owner-xep-support@renderx.com [mailto:owner-xep-support@renderx.com] Im Auftrag von G. Ken Holman
Gesendet: Montag, 21. Januar 2008 17:41
An: xep-support@renderx.com
Betreff: Re: AW: AW: [xep-support] XSLFO: trouble with text-align-last="justify" and linefeed-treatment="preserve"

At 2008-01-21 15:22 +0100, Kirch Fritz wrote:
>OK Here is my real world example:

By "real world" I would have more thought about the nature of the
problem being solved, not the technical aspects of the problem that
don't work based on a preconceived notion.

>The FO-file and the PDF-file is in attachement
>
>If you take a look into the pdf-file: I am very interested in
>solving the problem with the last red block.

Looking at your examples, I think the problem is solved before XSL-FO
is involved.

Between the last two examples, somewhere in the "real world" a choice
was made that a long line with two names had to be split up into two
lines with names being separate. Choosing to use a linefeed to split
up the two lines triggers the technical problems you've
cited. Choosing an empty block would do the same.

Since you want different behaviours for both lines, at the point
where you decided that two lines were needed you could have made the
decision to use two blocks, the non-last blocks formatted unjustified
and the last block formatted justified.

So I don't think XSL-FO is at fault.

 From the "real world" perspective, what does the XML look like that
you need formatted? That would tell us the nature of the problem to
be solved, it wouldn't focus on a technical solution that may be the
wrong one to start with. Hence Micheal's comment:

At 2008-01-21 16:03 +0300, Michael Sulyaev wrote:
>Fairly, I've never seen linefeed-treatment="preserve" without
>white-space-treatment="preserve", and when they are set together,
>justification is not required. Could you send a real world example
>when you cannot achieve what you need?

It would leave open a number of other approaches that might very
easily be solved, such that the reader of the archive wouldn't think
that XSL-FO was at fault when all along it was the choice of XSL-FO being used.

I hope this helps.

. . . . . . . . . . . . Ken

--
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.html
**********************************************************************
Diese E-Mail wurde auf Viren ueberprueft.
mailsweeper@it2media.de
**********************************************************************
-------------------
(*) 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.html
Received on Mon Jan 21 10:38:50 2008

This archive was generated by hypermail 2.1.8 : Mon Jan 21 2008 - 10:38:51 PST