Re: xmlroff-list digest, Vol 1 #145 - 2 msgs

Bruno Sadiez <[email protected]> Thu, 7 Apr 2005 01:46:02 +0200 (CEST)
Newsgroups gmane.text.xml.xmlroff.general
Message-ID <[email protected]>
hello Tony,

thank you for the fast reply.

I've tried to do as you said. I cannot get past this
error message:
 variable `fo_invoice_result_tree' has initializer but
incomplete type
error: storage size of `fo_invoice_result_tree' isn't
known

fo_invoice_result_tree is declared as a FoXmlDoc.

Any idea ?




 --- [email protected] a
écrit : 
> Send xmlroff-list mailing list submissions to
> 	[email protected]
> 
> To subscribe or unsubscribe via the World Wide Web,
> visit
> 
>
https://lists.sourceforge.net/lists/listinfo/xmlroff-list
> or, via email, send a message with subject or body
> 'help' to
> 	[email protected]
> 
> You can reach the person managing the list at
> 	[email protected]
> 
> When replying, please edit your Subject line so it
> is more specific
> than "Re: Contents of xmlroff-list digest..."
> 
> 
> Today's Topics:
> 
>    1. hello (Bruno Sadiez)
>    2. Re: hello (Tony Graham)
> 
> --__--__--
> 
> Message: 1
> Date: Tue, 5 Apr 2005 19:26:11 +0200 (CEST)
> From: Bruno Sadiez <[email protected]>
> To: [email protected]
> Subject: [xmlroff] hello
> 
> I'm currently working  on a project for a
> philanthropic organization. I need to write an
> invoicing application in C. I am not a professional
> developer. 
> What I need to do is fetch data from a database and
> issue PDF invoices.
> I'm using Daniel Veillard's Libxml2 library and I
> can
> issue XML data files with all the required billing
> details. I have written an XSL file with formating
> objects. 
> As this project is supposed to issue many thousand
> invoices at the end of each month, performance is a
> concern. I would like to be able to
> 		Load my XSLFO file only once
> 		Apply it to many thousand dynamically created XML
> data trees.
> 
> 
> 		my code goes:
> 
> 		xmlDocPtr invoice_doc = NULL;
> 		(..... )
> 
> 		invoice_doc = xmlNewDoc(BAD_CAST "1.0");
>  		invoice_root_node = xmlNewNode(NULL, BAD_CAST
> "invoice");
>  		xmlDocSetRootElement(invoice_doc,
> invoice_root_node);
> 
> then I populate the tree with the required billing
> details.
> 
> How is it possible to dynamically transform that
> memory tree into a PDF. I would like to avoid
> writing
> xml data files to disk.
> 
> I hope I'm being clear.
> 
> Thanks in advance
> 
> 
> 	
> 
> 	
> 		
>
__________________________________________________________________
> Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace
> de stockage pour vos mails ! 
> Créez votre Yahoo! Mail sur
> http://fr.mail.yahoo.com/
> 
> 
> --__--__--
> 
> Message: 2
> Date: Wed, 06 Apr 2005 04:26:56 +0100
> From: Tony Graham <[email protected]>
> Subject: Re: [xmlroff] hello
> To: [email protected]
> 
> Welcome to the xmlroff-list, and thank you for your
> interest in
> xmlroff.
> 
> Bruno Sadiez <[email protected]> writes:
> > I'm currently working  on a project for a
> > philanthropic organization. I need to write an
> > invoicing application in C. I am not a
> professional
> > developer. 
> > What I need to do is fetch data from a database
> and
> > issue PDF invoices.
> > I'm using Daniel Veillard's Libxml2 library and I
> can
> > issue XML data files with all the required billing
> > details. I have written an XSL file with formating
> > objects. 
> > As this project is supposed to issue many thousand
> > invoices at the end of each month, performance is
> a
> > concern. I would like to be able to
> > 		Load my XSLFO file only once
> > 		Apply it to many thousand dynamically created
> XML
> > data trees.
> >
> >
> > 		my code goes:
> >
> > 		xmlDocPtr invoice_doc = NULL;
> > 		(..... )
> >
> > 		invoice_doc = xmlNewDoc(BAD_CAST "1.0");
> >  		invoice_root_node = xmlNewNode(NULL, BAD_CAST
> > "invoice");
> >  		xmlDocSetRootElement(invoice_doc,
> > invoice_root_node);
> >
> > then I populate the tree with the required billing
> > details.
> >
> > How is it possible to dynamically transform that
> > memory tree into a PDF. I would like to avoid
> writing
> > xml data files to disk.
> >
> > I hope I'm being clear.
> 
> Yes, you are.
> 
> The short answer is that you can do what you want.
> 
> The public interfaces for the libfo library work on
> filenames for the
> XML input and the XSLT stylesheet (if any) so
> someone using the
> library doesn't have to know or care about libxml2
> or libxslt.
> 
> The public interfaces work on either strings or
> FoXmlDoc objects that
> are really just GObject wrappers of libxml2.
> 
> The FoXSLTFormatter wrapper for libxslt currently
> requires a string
> for the filename for the XSLT stylesheet, which is
> possibly
> shortsighted of me.
> 
> You can, however, do the transformation yourself
> using libxslt and
> then create a FoXmlDoc from the result of your
> transformation using
> fo_xml_doc_set_xml_doc() from fo-xml-doc-private.h:
> 
>    FoXmlDoc result_tree = fo_xml_doc_new ();
>    fo_xml_doc_set_xml_doc (result_tree,
> your_xml_doc_ptr);
> 
> You can then use your 'result_tree' with an
> FoXSLFormatter as in
> xmlroff-libfo.c from the libfo-examples package.
> 
> The other thing to look at is using fo_libfo_init2()
> and supplying
> your own malloc, etc. so that libfo and libxslt use
> the same heap.
> 
> You are trying something that AFAIK hasn't been
> tried before, so I'm
> interested to know how you get on.  I do expect that
> you will find
> that xmlroff has memory leaks, but if you can
> identify them, we can
> look to fixing them.
> 
> Regards,
> 
> 
> Tony.
> 
> 
> 
> 
> --__--__--
> 
> 
=== message truncated === 


	

	
		
__________________________________________________________________
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click