|
It may be the JVM running out of memory - I've experienced that with FOP - try adding something like "-Xmx256m" or "-Xmx512m" to the Java command line that runs FOP.
|
|
|
|
|
Thank you but then i run out of virtual memory...
so yet again i run out of memory.
Does anybody know if there is a command that forces the fop OR JVM to release the Memory and then go on?
He who laughs last...
-- modified at 8:27 Monday 17th July, 2006
|
|
|
|
|
How much RAM and virtual memory does your PC have?
BTW - I have generated up to 700 pages wih FOP, mostly using tables - so I don't think your data is likely to be the problem.
|
|
|
|
|
256 mb ram
i can set the virual memory.
Did it take long to generate that big pdf files?
mine takes 4ever...
He who laughs last...
|
|
|
|
|
NarutoFan#1 wrote: Did it take long to generate that big pdf files?
With that amount of RAM, yes....it'll be swapping like mad.
I've not used FOP for anything significant with less than 512MB, 1GB of RAM is preferable...
|
|
|
|
|
how big does your java.exe get in the taskmanager when you run fop?
He who laughs last...
|
|
|
|
|
I've just run my "big" FOP sample - it produces a 681 page document, which is probably 80% tables. Its virtual memory usage peaked at 323MB.
I also tried it on parts of the big sample. A 24 page sample took around 40MB to produce.
|
|
|
|
|
Thank you for your time...
Are there any "for-each" statements in your xsl?
He who laughs last...
|
|
|
|
|
Hmmmm - the fact that you say that implies it might not be FOP, but your XSLT engine - my PDF production process has two steps - firstly, transform XML files to XSL-FO files using XSLTPROC[^], then use FOP to convert the XSL-FO to PDF. Which step is failing for you?
[Edit]I've got one xsl:for-each in my XSL transform.[/edit]Last modified: 18 July 2006 02:41:26 --
|
|
|
|
|
oh okay, so it might be at the stage where the xml and xsl gets transformed into xsl-fo and not necessarily the part where it gets transformed into pdf by fop?
i send a xml file and xsl file to fop and i think fop converts it to xsl-fo for me and then to pdf, i never see the xsl-fo.
He who laughs last...
|
|
|
|
|
Yep, could be. If you look at this[^], it says there should be a file called xalan.bat in your FOP distribution that you can run to produce the XSL-FO files. Try that and see if that's where the memory usage occurs.
This[^] may also help, WRT memory problems.
|
|
|
|
|
Do you know where i'd be able to download fop source code? i'm going to look for it on the internet, but if you know where i can find it that would be great.
i want to try and step through the code to see if i can find any problem. It's a long shot but worth a try i suppose...
He who laughs last...
|
|
|
|
|
Wait, i found.
Thank you for your time.
Does anybody know how to step through the fop code as it gets executed?
He who laughs last...
|
|
|
|
|
I am having a XML file.
I wish to create a class in VB.NET, dynamically.
The name of all properties will be same as tag names in HTML file and value of that property will be value within tags.
Ex. Consider part of XML file as follows.
Kumar
27
.....and so on
Now when I create a class from it,
I should have someting like this
Lets say obj is object os class.
obj.Name
obj.Age
and value of obj.Name should be "Kumar", obj.Age--"27" and so on
Can any one help me out in this case?
Regards,
Amol
Every thing will come to you if you have faith.
|
|
|
|
|
hi,
i want to create an XML file through windows forms using visual studio.net 2005 . i hav provded n interface with text boxes nd combos the programs takis in values from then nd write them in the file .. but i can enter inly one data using this cuz wen i append this file it fivs an error that root document tag is being repeated .. so need help with appending an XML file
warm ragards BIa Ali
|
|
|
|
|
Can you tell us what you are using to create the xml? Basically your problem is that an xml document can only have one root node so - <root><node><root><node> is invalid. The valid way to store two nodes would be - <root><node><node>
|
|
|
|
|
im using C# the basic problem is im having probem in appending the file it cant take one more than one data once i dono how to file n XML document if i wana add more than one data at once it doesnt allow me to append the file cuz the root tag is being repeated.. i wana create a dictionar in XML format in order to create that dictionary i m using text boxes, radio buttons check boxes it does store that data as tags in file but dsnt store multiple data
thanks for ur reply
regards
Bia
-- modified at 7:53 Monday 17th July, 2006
|
|
|
|
|
Hi guys,
i am transforming an file called XMLFile.xml along with the appropriate xslt file
like this:
XPathDocument surveyDoc = new XPathDocument(Server.MapPath("XMLFile.xml"));
// Load the xslt to do the transformations
XslTransform transform = new XslTransform();
transform.Load(Server.MapPath("dynamicControls.xslt"));
// Get the transformed result
StringWriter sw = new StringWriter();
transform.Transform(surveyDoc, null, sw);
But the xmlfile.xml contents are like:
<formname name="BusinessUnit">
details
followed by another form details.
<formname name="foreign unit">
details
so i want to specify the required formname in new XPathDocument=(Server.MapPath("XMLFile.xml")); //i.e BusinessUnit for ex: not the entire
xml file how can i pass only the required xml content(i.e only a part of the xml file containing required form details) want for transformation.I.e i dont want to transform foreign unit part also within the xml file.Please throw some light on this.
Thks in advance,
-- modified at 9:48 Sunday 16th July, 2006
|
|
|
|
|
Hi,
I have a problem when working with Mobipocket Creator (e-book publishing soft.)
I am making a custom dictionary.
I have an access db which I plan to output to xml file with structure like that:
In definition field, there will be more lines of text/<BR> tags or whatever else but I need that the final html file has those definitions multiline - I need to preserve multiline character of that field.
Thanks very much for your help.
<?xml version="1.0"?>
<!-- This file contains the structure of the sample dictionnary
The tags in this document are independent from the MobiPocket compiler tags
-->
<dictionary>
<word>
<orth>chair</orth>
<id>1</id>
<definition>
LINE1
LINE2
LINE3</definition>
<gramgrp>noun</gramgrp>
<infl>chairs</infl>
<usage>standard
</usage>
<etymology>from Latin "cathedra"</etymology>
</word>
</dictionary></pre></code>
then I have an xsl file:
<?xml version="1.0" ?>
<!-- This xsl file is used as a parser for the file "dictionary.xml". It used to produce an html file and
to transform tags present in "dictionary.xml" into MobiPocket tags.-->
<xsl:stylesheet version="2.0" xmlns:idx="www.mobipocket.com" xmlns:mbp="www.mobipocket.com" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink">
<xsl:output method="xml"/>
<!-- Main Template -->
<xsl:template match="dictionary">
<html>
<body>
<mbp:pagebreak/>
<mbp:frameset>
<mbp:pagebreak crossable="no"/>
<xsl:for-each select="word">
<idx:entry name="word" scriptable="yes">
<xsl:attribute name="id">
<xsl:value-of select="id" />
</xsl:attribute>
<b><idx:orth><xsl:value-of select="orth"/></idx:orth></b>
<br/>
<xsl:value-of select="definition"/><br/>
<idx:string name="usage">
<xsl:attribute name="value">
<xsl:value-of select="usage" />
</xsl:attribute>
</idx:string>
usage : <xsl:value-of select="usage"/><br/>
<mbp:pagebreak/>
<br/>
</idx:entry>
<mbp:pagebreak crossable="no"/>
</xsl:for-each>
</mbp:frameset>
<xsl:apply-templates select="word"/>
</body>
</html>
</xsl:template>
<!-- Sub Templates -->
<!-- when a match is found for "orth" or "id" or "infl" or "gramgrp" or "etymology" or "definition",
this template is used to indicate that nothing has to be done-->
<xsl:template match="orth|id|infl|usage|gramgrp|etymology|definition"/>
</xsl:stylesheet>
In definition field, there will be more lines of text/<BR> tags or whatever else but I need that the final html file has those definitions multiline - I need to preserve multiline character of that field.
Thanks very much for your help.
-- modified at 8:24 Saturday 15th July, 2006"/>
<xsl:for-each select="word">
<idx:entry name="word" scriptable="yes">
<xsl:attribute name="id">
<xsl:value-of select="id" />
</xsl:attribute>
<b><idx:orth><xsl:value-of select="orth"/></idx:orth></b>
<br/>
<xsl:value-of select="definition"/><br/>
<idx:string name="usage">
<xsl:attribute name="value">
<xsl:value-of select="usage" />
</xsl:attribute>
</idx:string>
usage : <xsl:value-of select="usage"/><br/>
<mbp:pagebreak/>
<br/>
</idx:entry>
<mbp:pagebreak crossable="no"/>
</xsl:for-each>
</mbp:frameset>
<xsl:apply-templates select="word"/>
</body>
</html>
</xsl:template>
<!-- Sub Templates -->
<!-- displays a Thesaurus page with its own frameset-->
<!-- when a match is found for "thesaurus" the following instructions will be executed-->
<xsl:template match="thesaurus">
<idx:ext-subentry name="thesaurus">
<xsl:attribute name="extends">
<xsl:value-of select="../id" />
</xsl:attribute>
<xsl:value-of select="."/>
</idx:ext-subentry>
<xsl:call-template name="top_frame_thesaurus" />
</xsl:template>
<!-- when a match is found for "orth" or "id" or "infl" or "gramgrp" or "etymology" or "definition",
this template is used to indicate that nothing has to be done-->
<xsl:template match="orth|id|infl|usage|gramgrp|etymology|definition"/>
<!-- displays the bottom frame of the main frameset - The javascript functions are defined in the file CoverPage.html -->
<xsl:template name="bottom_frame">
<mbp:slave-frame display="bottom" device="all" breadth="auto" leftmargin="0" rightmargin="0" bottommargin="0" topmargin="0">
<div align="center" bgcolor="yellow"/>
<a onclick="f_on_usage()">usage</a><xsl:text> </xsl:text>
<a onclick="f_on_etymology()">etymology</a><xsl:text> </xsl:text>
<a onclick="f_on_thesaurus()">thesaurus</a>
</mbp:slave-frame>
</xsl:template>
<!-- displays the top frame of the main frameset -->
<xsl:template name="top_frame">
<mbp:slave-frame display="top" device="all" breadth="auto" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<div align="center" bgcolor="blue">
<h3><font color="white"> Dictionary </font>
</h3>
</div>
</mbp:slave-frame>
</xsl:template>
<!-- displays the top frame of the Thesaurus page -->
<xsl:template name="top_frame_thesaurus">
<mbp:slave-frame display="top" device="all" breadth="auto" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<div align="center" bgcolor="green">
<h3><font color="white"> Thesaurus Dictionary </font>
</h3>
</div>
</mbp:slave-frame>
</xsl:template>
</xsl:stylesheet>
-- modified at 11:12 Saturday 15th July, 2006
|
|
|
|
|
Hi all,
Just as i thought i had it all figured out...
I want to create a table in fop with all the columns next to each other... as the columns reach the end of the page i want to create a new row. I thought i knew how to do this... just add a counter and if the counter reaches a certain amount, insert a new row. But the problem is this:
<xsl:for-each select="TableInfo">
<fo:table-row><xsl:variable name="counter" select="0"/>
<xsl:if test="ClientTitle"><xsl:variable name="counter" select="1+$counter"/>
<fo:table-cell font-size="8pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
Client Title:
</fo:block>
</fo:table-cell>
<fo:table-cell font-size="8pt" 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="ClientName"><xsl:variable name="counter" select="1+$counter"/>
<fo:table-cell font-size="8pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
Client Name:
</fo:block>
</fo:table-cell>
<fo:table-cell font-size="8pt" 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="ClientSur"><xsl:variable name="counter" select="1+$counter"/>
<fo:table-cell font-size="8pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
Client Surname:
</fo:block>
</fo:table-cell>
<fo:table-cell font-size="8pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientSur"/>
</fo:block>
</fo:table-cell>
</xsl:if>
</fo:table-row>
</xsl:for-each>
He who laughs last...
|
|
|
|
|
So... What i wanted to do...
I wanted to say right after i closed each cell...
<xsl:if test="$counter = 2"></fo:table-row><fo:table-row></xsl:if>
but then i realized i can't... i have to close the "last opened, first closed" tag...
so yet again i don't know how to go to a new row if the cells reach the end of the page.
He who laughs last...
-- modified at 4:12 Friday 14th July, 2006
|
|
|
|
|
I wanted to change to cursor when it goes over an element in SVG document, I tried to set cursor="wait" attribute within that element, but it didn't work. How could I do so then .. I wanted to change the cursor when I am dragging the svg element too.. any suggestion ? And I am using IE as the browser to display the SVG.
|
|
|
|
|
I have an XML file which stores information of authors and books written by them.
The following XQuery returns me a list of authors:-
<results>
{
for $b in doc("http://www.bn.com/bib.xml")//author
return
<result author="{$b/last | $b/first}" ></result>
}
</results>
However the resultset returned is:-
- <results>
<result author="Stevens W." />
<result author="Stevens W." />
<result author="Abiteboul Serge" />
<result author="Buneman Peter" />
<result author="Suciu Dan" />
</results>
(since there could be more than 1 book written by an author)
How do I change the above query to filter out duplicates?
I saw a few sites which suggested using 'intersect'.I also came across the
distinct-values function
But I do not know how to use it in this example.
Pls suggest
-- modified at 7:47 Thursday 13th July, 2006
|
|
|
|
|
Got it with "distinct-values"
<results>
{
let $a := doc("http://www.bn.com/bib.xml")//author
for $last in distinct-values($a/last),
$first in distinct-values($a[last=$last]/first)
return
<result>{$last}{$first}</result>
}
</results>
|
|
|
|
|
I'm trying to write an XPath query to match a node that has an attribute that contains a certain word. The obvious *[@attr="findme"] only works if the target attribute consists of *only* the word "findme". My target XML nodes might have the attribute "foo findme bar".
Using *[contains(@attr,"findme")] doesn't quite work either since it will also match a node if the attribute contains "x-findme", for example.
The best I've been able to come up with is this:
*[contains(concat(" ",concat(@class," ")," findme ")]
but this is obviously clumsy.
Is there a better way e.g. some way I can define my own XPath extension function called contains_word() that I can get MXSML to invoke?
0 bottles of beer on the wall, 0 bottles of beer, you take 1 down, pass it around, 4294967295 bottles of beer on the wall.
Awasu 2.2.2 [^]: A free RSS/Atom feed reader with support for Code Project.
|
|
|
|