|
Hi all,
about USMT and explain how it works?
Please let me know how to start, how to program an USMT (User State Migration Tool)
-- modified at 7:11 Tuesday 25th July, 2006
|
|
|
|
|
Hi All,
i want to create a page sequence for every page that has a table on it to minimize the memory consumption of fop...
i want it to look like this:
[-------------------------Heading--------------------------]
[--------------------------Date----------------------------]
<This is where the page sequence should start>
ClientName-------ClientSurname
Jan--------------Smit
Piet-------------Poggenpoel
Gert-------------Koekemoer
Jaun-------------Du Randt
Sandra-----------Smith
Sam--------------Watkens
James------------Small
James------------Dalton
Peter------------Edison
Hennie-----------Hannekom
Werner-----------Pienaar
Frik-------------Delport
Mariska----------de Lange
Sam--------------de Lange
<This is where i want the page sequence to stop>
<Now The Start of a new page sequence>
ClientName-------ClientSurname
Jan--------------Venter
Hanno------------Britz
Jannie-----------Jobert
Sannie-----------Jobert
Wilma------------Molen
Willie-----------Pretorius
<End of the page sequence>
<div class="ForumSig">He who laughs last...</div>
|
|
|
|
|
<?xml version="1.0"?>
<?xml-stylesheet type='text/xsl' href='ClientLookUpResult.xsl'?>
<ClientLookUp>
<Title>
<Heading>Client Look-Up Result</Heading>
<DateCreated>Date Created: 24 July 2006 03:56 PM</DateCreated>
</Title>
<TableEntries>
<ClientName1>Yes</ClientName1>
<ClientSur1>Yes</ClientSur1>
<TableInfo Key="0">
<ClientName>Estelle</ClientName>
<ClientSurname>Van Graan</ClientSurname>
</TableInfo>
<TableInfo Key="1">
<ClientName>Natalie</ClientName>
<ClientSurname>Liebenberg</ClientSurname>
</TableInfo>
<TableInfo Key="2">
<ClientName>Irma</ClientName>
<ClientSurname>Du Plessis</ClientSurname>
</TableInfo>
<TableInfo Key="3">
<ClientName>Sandra</ClientName>
<ClientSurname>Nortje</ClientSurname>
</TableInfo>
<TableInfo Key="4">
<ClientName>Sandra</ClientName>
<ClientSurname>Nortye</ClientSurname>
</TableInfo>
<TableInfo Key="5">
<ClientName>Kathy</ClientName>
<ClientSurname>Ferreira</ClientSurname>
</TableInfo>
<TableInfo Key="6">
<ClientName>Antionette</ClientName>
<ClientSurname>Viloene</ClientSurname>
</TableInfo>
<TableInfo Key="7">
<ClientName>Lindsay</ClientName>
<ClientSurname>Scot</ClientSurname>
</TableInfo>
<TableInfo Key="8">
<ClientName>Waynand</ClientName>
<ClientSurname>Wessels</ClientSurname>
</TableInfo>
<TableInfo Key="9">
<ClientName>Anja</ClientName>
<ClientSurname>Eggers</ClientSurname>
</TableInfo>
<TableInfo Key="10">
<ClientName>Susca</ClientName>
<ClientSurname>Watts</ClientSurname>
</TableInfo>
<TableInfo Key="11">
<ClientName>Elsabe</ClientName>
<ClientSurname>Van Zyl</ClientSurname>
</TableInfo>
<TableInfo Key="12">
<ClientName>Magriet</ClientName>
<ClientSurname>Fourie</ClientSurname>
</TableInfo>
<TableInfo Key="13">
<ClientName>Adele</ClientName>
<ClientSurname>Van Eck</ClientSurname>
</TableInfo>
<TableInfo Key="14">
<ClientName>Elna</ClientName>
<ClientSurname>Booysen</ClientSurname>
</TableInfo>
<TableInfo Key="15">
<ClientName>Claudia</ClientName>
<ClientSurname>Henkel</ClientSurname>
</TableInfo>
<TableInfo Key="16">
<ClientName>Marius</ClientName>
<ClientSurname>Barnard</ClientSurname>
</TableInfo>
<TableInfo Key="17">
<ClientName>Heilet</ClientName>
<ClientSurname>Van Zyl</ClientSurname>
</TableInfo>
<TableInfo Key="18">
<ClientName>Frances</ClientName>
<ClientSurname>Bredenkamp</ClientSurname>
</TableInfo>
<TableInfo Key="19">
<ClientName>Carol</ClientName>
<ClientSurname>Waterston</ClientSurname>
</TableInfo>
<TableInfo Key="20">
<ClientName>Carly</ClientName>
<ClientSurname>Steyn-Pillay</ClientSurname>
</TableInfo>
<TableInfo Key="21">
<ClientName>Suzann</ClientName>
<ClientSurname>Stoman</ClientSurname>
</TableInfo>
<TableInfo Key="22">
<ClientName>Brett</ClientName>
<ClientSurname>Deeve</ClientSurname>
</TableInfo>
<TableInfo Key="23">
<ClientName>Lynn-Ann</ClientName>
<ClientSurname>Fuchsloch</ClientSurname>
</TableInfo>
<TableInfo Key="24">
<ClientName>Corina</ClientName>
<ClientSurname>Koorson</ClientSurname>
</TableInfo>
<TableInfo Key="25">
<ClientName>Debbie</ClientName>
<ClientSurname>Visagie</ClientSurname>
</TableInfo>
<TableInfo Key="26">
<ClientName>Francois</ClientName>
<ClientSurname>Coetzee</ClientSurname>
</TableInfo>
</TableEntries>
</ClientLookUp>
|
|
|
|
|
So i basically need one page-sequence for each "TableEntries"
Is this possible?
He who laughs last...
|
|
|
|
|
Though you posted three messages to clear but some how I am still unclear. what my understanding is you have suppose 10 Tables on 10 different pages. in total and suppose 20 Pages of report contains tables on last 10 pages so the page number will start from 1 where table 1 will come and then it will be 2,3,4 and if there will be any page with no table it will skip that and will count the next page from the last numbered page ???
|
|
|
|
|
no, not exactly...
my whole document is one BIG table. What i want to do is split this table into smaller tables... One on each page and each page should be a "page-sequence"...
if that makes sence...
i am starting to get it right but i still need help.
If you'd like, i can post my xsl for you to show you what i've got thusfar...
He who laughs last...
|
|
|
|
|
if you look at my xml file...
each one of the tableInfo tags is a table row in my table.... hope this makes it a little more clear as to what i am after...
He who laughs last...
|
|
|
|
|
So, Lets say {for aguments sake"} i want to insert a new page-sequence after every 30 rows. I want to do this because i read that FOP release memory after every page-sequence and due to the fact that it holds onto memory when it comes to tables. Just before i close the page-sequence i want to close the table. With the new page-sequence, i want to start a new table and this new table should be on a new page.
It sounds so difficult even me who is trying to explain what i'm looking for find it hard to put into words...
So, hopefully by inserting multiple page-sequences after every so table rows, i am freeing much needed memory.
He who laughs last...
|
|
|
|
|
ok what I understand is that after each 30 rows you need a new page with table headers and offcourse page sequence... paste above this line <fo:flow flow-name="xsl-region-body">
'' Copy below this... this will add a footer which you need on every page
<fo:static-content flow-name="xsl-region-after">
<fo:table table-layout="fixed" >
<fo:table-column column-width="150mm"/>
<fo:table-column column-width="30mm"/>
<fo:table-body >
<fo:table-row>
<fo:table-cell border-top-width="0.5px" border-top-style="solid">
<fo:block font-size="6.0pt" font-family="sans-serif" padding-after="2.0pt"
text-align="left" font-weight="bold" space-before="1mm"
>Printed :Date Here</fo:block>
</fo:table-cell>
<fo:table-cell border-top-width="0.5px" border-top-style="solid">
<fo:block font-size="6.0pt" font-family="sans-serif" space-before="1mm"
text-align="end"
font-weight="bold"
>Page <fo:page-number/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:static-content>
'' For Page Break you can use this
<fo:block break-before="page"></fo:block>
-- modified at 4:54 Tuesday 25th July, 2006
|
|
|
|
|
These threads have been going on for quite a while. If I were you, I would count up all the hours I just spent researching ways to get around FOP's shortcomings. Then I would estimate how much time I expect to spend solving the current problem and how much time will be wasted in the future when doing other reports. Then I would write this up in a report and include a description of how your workarounds are adding unnecessary complexity which makes it harder to maintain the stylesheets. Then, find an alternative: a commercial product that does the same thing as FOP but without the memory problems. Be careful to do your homework because even some of the commercial products have the same problem. I used Chive Apoc at one job and it worked great, plus it has an evaluation version.
Gather all of this information into a report and submit it to your manager. It is often difficult to convince managers to buy a tool especially when there are free ones available. That's why you have to convince him/her. I ran into FOP's memory problem like 4 years ago and they still haven't fixed it. If they haven't done it yet, they probably never will. Your time costs money. You have to show your manager that they will save money by buying a tool instead of having you spend tons of time coming up with creative workarounds.
Logifusion[^]
|
|
|
|
|
Thanks dustin, once again
The thing is, i'm so close, i can feel it...
this page sequence thing is looking promissing...
i almost got it just one more hick-up. My stylesheet has one more problem that i'm struggling with, then, hopfully, i wont need no patch for FOP and my memory problem will be very small. I have an example of the page sequence method but i'm stuggling to implement it. Not shure what part is doing what. You know?...
He who laughs last...
|
|
|
|
|
Well I hope you get it all solved. It's gratifying to solve difficult problems like this. But do keep in mind that ultimately someone is paying you to do a job and time you spend spinning your wheels costs them money. (Not to mention time spent surfing code project because you're uninterested in the work you're doing, but let's forget about me )
Logifusion[^]
|
|
|
|
|
LOL
You better not be playing when jou have to be working, only then can you preach to me
but i appreciate all your time spent trying to help me.
He who laughs last...
|
|
|
|
|
You have to identify where in your document could be inserted a page break
or
decide to break intentionally after N rows of datas (1 record on your XML
file can be M rows on document so M*N is the total rows on document)
In the second case put logic for break when ciclying your datas templates
using something like this ($STOP is max number of data rows for page):
<xsl:for-each select="DATA_ROW[position() mod $STOP = 1]">
<fo:page-sequence master-reference="YOUR_MASTER_REFERENCE"
initial-page-number="auto">
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed" width="480pt">
<fo:table-column column-width="85pt"/>
<fo:table-column column-width="15pt"/>
<fo:table-body>
<fo:table-row line-height="30pt">
<fo:table-cell>
<fo:block
text-align="center" font-size="10pt" font-family="Courier">title
1</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block
text-align="center" font-size="10pt" font-family="Courier">title
2</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<xsl:for-each
select=".|following-sibling::DATA_ROW[position() < $STOP]">
<xsl:apply-templates select="."/>
</xsl:for-each>
</fo:flow>
</fo:page-sequence>
</xsl:for-each>
<xsl:template match="DATA_ROW">
<fo:table table-layout="fixed" width="480pt">
<fo:table-column column-width="85pt"/>
<fo:table-column column-width="10pt"/>
<fo:table-body>
<fo:table-row line-height="13pt">
<fo:table-cell>
<fo:block text-align="left"
font-size="10pt" font-family="Courier">
<xsl:value-of
select="YOUR_ROW_KEY_1"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="center"
font-size="10pt" font-family="Courier">
<xsl:value-of
select="YOUR_ROW_KEY_2"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
He who laughs last...
|
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="ClientLookUp">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple"
page-height="21cm"
page-width="29.7cm"
margin-top="1cm"
margin-bottom="2cm"
margin-left="1.5cm"
margin-right="1.5cm">
<fo:region-body margin-top="2cm"/>
<fo:region-before extent="1.5cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<xsl:variable name="STOP" select="2"/>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block>
<xsl:apply-templates select="ClientLookUp"/>
<xsl:apply-templates select="Title"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
<xsl:for-each select="TableEntries[position() mod $STOP = 1]">
<fo:page-sequence master-reference="simple" initial-page-number="auto">
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed" width="750pt">
<xsl:if test="ClientTitle1">
<fo:table-column column-width="30pt"/>
</xsl:if>
<xsl:if test="ClientName1">
<fo:table-column column-width="60pt"/>
</xsl:if>
<xsl:if test="ClientSur1">
<fo:table-column column-width="80pt"/>
</xsl:if>
<xsl:if test="ClientCode1">
<fo:table-column column-width="35pt"/>
</xsl:if>
<xsl:if test="ClientType1">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="ClientBDay1">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="ClientStaff1">
<fo:table-column column-width="85pt"/>
</xsl:if>
<xsl:if test="TelH">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="TelW">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="Cell1">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="EmailH">
<fo:table-column column-width="105pt"/>
</xsl:if>
<xsl:if test="EmailW">
<fo:table-column column-width="105pt"/>
</xsl:if>
<fo:table-body>
<fo:table-row>
<xsl:if test="ClientTitle1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Title
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientName1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
ClientName
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientSur1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
ClientSurname
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientCode1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
ClientCode
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientType1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
ClientType
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientBDay1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
BirthDate
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientStaff1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Staff
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="TelH">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Tel(H)
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="TelW">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Tel(W)
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="Cell1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Cell
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="EmailH">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Email(H)
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="EmailW">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Email(W)
</fo:block>
</fo:table-cell>
</xsl:if>
</fo:table-row>
</fo:table-body>
</fo:table>
<xsl:for-each select=".|following-sibling::TableEntries[position() < $STOP]">
<xsl:apply-templates select="."/>
</xsl:for-each>
</fo:flow>
</fo:page-sequence>
</xsl:for-each>
</fo:root>
</xsl:template>
<xsl:template match="Title">
<fo:block font-size="18pt"
font-family="sans-serif"
line-height="20pt"
space-after.optimum="1pt"
background-color="blue"
color="white"
text-align="center"
padding-top="3pt">
<xsl:value-of select="Heading"/>
</fo:block>
<fo:block font-size="16pt"
font-family="sans-serif"
line-height="18pt"
space-after.optimum="1pt"
background-color="blue"
color="white"
text-align="center"
padding-top="3pt">
<xsl:value-of select="DateCreated"/>
</fo:block>
</xsl:template>
<xsl:template match="TableEntries">
<fo:block width="750pt">
<fo:table table-layout="fixed" width="750pt">
<xsl:if test="ClientTitle1">
<fo:table-column column-width="30pt"/>
</xsl:if>
<xsl:if test="ClientName1">
<fo:table-column column-width="60pt"/>
</xsl:if>
<xsl:if test="ClientSur1">
<fo:table-column column-width="80pt"/>
</xsl:if>
<xsl:if test="ClientCode1">
<fo:table-column column-width="35pt"/>
</xsl:if>
<xsl:if test="ClientType1">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="ClientBDay1">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="ClientStaff1">
<fo:table-column column-width="85pt"/>
</xsl:if>
<xsl:if test="TelH">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="TelW">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="Cell1">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="EmailH">
<fo:table-column column-width="105pt"/>
</xsl:if>
<xsl:if test="EmailW">
<fo:table-column column-width="105pt"/>
</xsl:if>
<fo:table-body>
<xsl:for-each select="TableInfo">
<fo:table-row>
<xsl:if test="ClientTitle">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientTitle"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientName">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientName"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientSurname">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientSurname"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientCode">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientCode"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientType">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientType"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientBDay">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientBDay"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientStaff">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientStaff"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="TelH">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="TelH"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="TelW">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="TelW"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="Cell">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="Cell"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="EmailH">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="EmailH"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="EmailW">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="EmailW"/>
</fo:block>
</fo:table-cell>
</xsl:if>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</fo:block>
</xsl:template>
</xsl:stylesheet>
He who laughs last...
|
|
|
|
|
The second page sequence is the problem...
I'm not shure what it is i'm doing wrong but it is not inserting more page sequences. Am i understanding correctly when i say that the Variable that i created STOP <just like in the example> is the number of rows in a table on a page. If it is then That is exactly what i want to do...
The thing is, i think that i'm looping the wrong for each. There is just one "TableEnties" tag... I think i should loop the "TableInfo" tag.
Is this correct?
If it is, would anyone have an idea of how to do so?
Thank you once again.
Okay, now i've tried putting in a TableEntries/TableInfo instead of TableEntries into the first for each in the seconde page-sequeance. This put in all the needed pages but did not display anything on the pages...
See, the thing i want to do is for every <lets say 5 as an example> "TableInfo" tags <every "TableInfo" tag is a Row in my table> i want to insert a new page-sequence.
Please help...
He who laughs last...
-- modified at 4:38 Tuesday 25th July, 2006
|
|
|
|
|
An exam question i'm posed with answering
What are the main ways of calling styles into a page?
discuss.
Please help.
|
|
|
|
|
Hallo,
Using Visual Studio 2003 I have a big problem editing a XML file with about 25000 lines. As soon as I copy paste something into the xml file validation starts which needs on my computer up to a minute. I do not need validation at all. I need fast editing capibilities. How can I switch this slow crap function off?
Sincerely
Chris
|
|
|
|
|
Hi everyone!
I know that this isn't the right place to post this message but i need help urgantly.
I read up on fop and there is a patch for the problem i'm having...
FOP runs my system's memory dry... This problem derives from the fact that FOP doesn't release the memory very well with tables and i have a very big table in my xsl.
You might make better sence of what they mean at these sites...
http://blog.gmane.org/gmane.text.xml.fop.user/day=20040124
http://comments.gmane.org/gmane.text.xml.fop.user/12120
Sorry yet again for posting it here.
He who laughs last...
|
|
|
|
|
I'll present you with an alternative to this. You're probably using FOP to take in the XML and the XSL and produce a PDF. It's been a few years, but what I recall about FOP and Java's XML processing in general is that they're both memory hogs. .Net's processing is a lot more efficient. What you could try is writing a little .Net command line app that takes your XML and XSL documents and applies the transform. Have it spit out an .fo document and then run that through FOP to get the PDF. Hopefully that will work for you!
Logifusion[^]
|
|
|
|
|
Hi Dustin,
Thank you for your reply...
i've recently read that "page-sequence" might help with the problem of the tables in fop hogging the memory. Do you think that putting a table on each page and setting each page to be a "page-sequence" would help?
Time is running out and i've looked every where for the patch but if this works, that would be GREAT.
Thank you in advance.
He who laughs last...
|
|
|
|
|
If i try to put a page sequence for each page i get an error
Here is my xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple"
page-height="21cm"
page-width="29.7cm"
margin-top="1cm"
margin-bottom="2cm"
margin-left="1.5cm"
margin-right="1.5cm">
<fo:region-body margin-top="2cm"/>
<fo:region-before extent="1.5cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block>
<xsl:apply-templates select="ClientLookUp"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="ClientLookUp">
<xsl:for-each select="Title">
<fo:block font-size="18pt"
font-family="sans-serif"
line-height="20pt"
space-after.optimum="1pt"
background-color="blue"
color="white"
text-align="center"
padding-top="3pt">
<xsl:value-of select="Heading"/>
</fo:block>
<fo:block font-size="16pt"
font-family="sans-serif"
line-height="18pt"
space-after.optimum="1pt"
background-color="blue"
color="white"
text-align="center"
padding-top="3pt">
<xsl:value-of select="DateCreated"/>
</fo:block>
</xsl:for-each>
<xsl:for-each select="TableEntries">
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block width="750pt">
<fo:table table-layout="fixed" width="750pt">
<xsl:if test="ClientTitle1">
<fo:table-column column-width="30pt"/>
</xsl:if>
<xsl:if test="ClientName1">
<fo:table-column column-width="60pt"/>
</xsl:if>
<xsl:if test="ClientSur1">
<fo:table-column column-width="80pt"/>
</xsl:if>
<xsl:if test="ClientCode1">
<fo:table-column column-width="35pt"/>
</xsl:if>
<xsl:if test="ClientType1">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="ClientBDay1">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="ClientStaff1">
<fo:table-column column-width="85pt"/>
</xsl:if>
<xsl:if test="TelH">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="TelW">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="Cell1">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="EmailH">
<fo:table-column column-width="105pt"/>
</xsl:if>
<xsl:if test="EmailW">
<fo:table-column column-width="105pt"/>
</xsl:if>
<fo:table-body>
<fo:table-row>
<xsl:if test="ClientTitle1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Title
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientName1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
ClientName
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientSur1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
ClientSurname
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientCode1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
ClientCode
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientType1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
ClientType
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientBDay1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
BirthDate
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientStaff1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Staff
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="TelH">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Tel(H)
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="TelW">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Tel(W)
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="Cell1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Cell
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="EmailH">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Email(H)
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="EmailW">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Email(W)
</fo:block>
</fo:table-cell>
</xsl:if>
</fo:table-row>
<xsl:for-each select="TableInfo">
<fo:table-row>
<xsl:if test="ClientTitle">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientTitle"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientName">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientName"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientSurname">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientSurname"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientCode">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientCode"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientType">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientType"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientBDay">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientBDay"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientStaff">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientStaff"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="TelH">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="TelH"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="TelW">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="TelW"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="Cell">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="Cell"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="EmailH">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="EmailH"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="EmailW">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="EmailW"/>
</fo:block>
</fo:table-cell>
</xsl:if>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</fo:block>
</fo:flow>
</fo:page-sequence>
<fo:block break-after="page"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
The Error:
--- Standard Output ---
[ERROR] org.apache.fop.apps.FOPException: page-sequence must be child of root, not fo:block
<div class="ForumSig">He who laughs last...</div>
-- modified at 5:14 Monday 24th July, 2006
|
|
|
|
|
The XSL you have here nests page-sequence s inside each other and you can't do that. A page-sequence gets paired up with a master . Take a look at this example from zvon[^]. It shows kind of how you would write a book in FO. The first 6 pages are done under one page-sequence and then the subsequent pages are done under a completely different set of page-sequence s where the first page has a header a certain way and the even and odd pages have the header aligned differently. It's a complex example, but it should give you an idea of how to use page-sequence s.
|
|
|
|
|
Cannot implicitly convert type 'System.Xml.XmlNodeList' to 'System.Xml.XmlElement'
how can i map/convert from 1 class to other using C#
rabia
|
|
|
|
|
Umm, a question like this scares me. First, you're saying you don't know how to cast in C# and yet you're working on a program that works with XML? Second, there's the fact that NodeList versus Element didn't tip you off that one is a list of nodes and the other is a single element. It sounds like you need to pick up a book on C# first before you go any further.
Logifusion[^]
|
|
|
|