|
|
|
Hello,every body,
please help to tell me how to save XML as string, (I use VC++ to develop)Pug XML Parser.thanks!!!
regards
angus
|
|
|
|
|
Don't cross post
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
Hi all,
I'm creating an xslfo file for printing and I have to use margin-top and margin-bottom. But I must ignore the previous margin-bottom to keep the blocks together. This margin-bottom only for last block of the page and pages can have more than one block. I cannot figure out which block is the last one of the page.
Is there any way to ignore margin-top or margin-bottom?
(I must use more than one block on each page and I'm creating all blocks with same way.)
Thanks all..
|
|
|
|
|
Hi all,
I am using FOP to generate pdf documents... It runs out of memory. I saw that a lot of people complained about this on the net but no one realy gave any answers on how to solve this.
One piece said that it could be the layout of the xsl but i tried everything to minimize the amount of for-each statements, and so on.
Some of my documents have 100+ pages. Most of my data is in tables, Would this be an issue?
I'm still reading up on this, if i find something i'll let you know. until then any help would be great. I don't know if posting my xsl file would be of any help?
He who laughs last...
|
|
|
|
|
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
|
|
|
|