You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Winterflood, Jonathan" <jo...@capgemini.com> on 2008/08/01 10:33:05 UTC
RE: Help with layout and design
Hi,
As far as I can tell, your current data is in some kind of fixed width columns, padded with spaces.
If this is the case, you could just use substring(string,start[,len]) to cut it up. Obviously this would require knowing the width of the column.
As a variation on Andreas' solution, maybe the splitting criteria could be the presence of n spaces (3 or so?)
Obviously these can break if the data ever gets too long and breaks the fixed-length column layout, or contains multiple spaces in the data, or the data is just small enough and there is only one space between columns.
Cheers,
Jonathan Winterflood (3237)
Capgemini Ouest - Agence de Brest
P Please consider the environment and do not print this email unless absolutely necessary. Capgemini encourages environmental awareness
________________________________
De : Ashish Kulkarni [mailto:ashish.kulkarni13@gmail.com]
Envoyé : jeudi 31 juillet 2008 21:14
À : fop-users@xmlgraphics.apache.org
Objet : Re: Help with layout and design
Hi
The issue, i am not the one designing this XML file, but it is already exisiting XML file, used in some other application,
This application some how has a templelate and then takes this XML file and mergers with this template to create PDF file, and i have to analyize if we can do this uing XSL-FO with out modifying the XML file.
I guess we cannot use the XML file as is, but have to modify the XML file to add some sort of delimiter to the data
Ashish
On Thu, Jul 31, 2008 at 12:51 PM, Griffin,Sean <SG...@cerner.com> wrote:
I don't think your problem will be XSLT and certainly not XSL-FO but how you tell the difference between one column and the next and which data element you're actually dealing with.
Just pseudo-code, outside of any particular language, what would the algorithm be for determining that. How you turn that algorithm into code in XSLT could be trivial, if it's even safely possible.
From: Ashish Kulkarni [mailto:ashish.kulkarni13@gmail.com]
Sent: Thursday, July 31, 2008 11:15 AM
To: fop-users@xmlgraphics.apache.org
Subject: Help with layout and design
Hi
I have an XML file where the data is as below
<data>
<line1>My Name 1 of 1</line1>
<line2>My Address 01/12/2008</line2>
<!--more lines of data here -->
</data>
I need to have boxes on PDF file like below, where i will hard code Name, page
___________________________________________________________________
Name: My Name Page: 1of 1
Address: My Address Date: 01/12/2008
___________________________________________________________________
Is it possible to do some thing like this using XSLT and XSL-Fo
Any suggestions
________________________________
CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message
in error, please notify the sender immediately and delete all copies of this message.