RE: Help with layout and design
2008-08-01 08:33:05 GMT
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.
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 <at> gmail.com]
Envoyé : jeudi 31 juillet 2008 21:14
À : fop-users <at> xmlgraphics.apache.org
Objet : Re: Help with layout and design
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
On Thu, Jul 31, 2008 at 12:51 PM, Griffin,Sean <SGRIFFIN <at> 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.
I have an XML file where the data is as below
<line1>My Name 1 of 1</line1>
<line2>My Address 01/12/2008</line2>
<!--more lines of data here -->
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
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.