Re: XML output to XSLT



On Tue, 2006-11-28 at 16:42 +0100, sergio aghemo wrote:
I've found 2 XSL files (print_details_to_html.xsl and 
print_report_to_html.xsl) and I guess that if I modify them I could 
achieve some printing enhancement.

But how could I obtain the XML output that XSLT transform? 

Actually, I don't think it's every written to disk.

It's generated in report_build() here:
http://cvs.gnome.org/viewcvs/glom/glom/reports/report_builder.cc?view=markup

And this calls GlomXslUtils::transform_and_open(), which you can see
here:
http://cvs.gnome.org/viewcvs/glom/glom/xsl_utils.cc?view=markup

You should be able to add some code there to make it write out the XML
to a temporary file, or just to stdout. You could use
xmlpp::Document::write_to_string() or write_to_string_formatted(). 

This code could be #ifdefed out, or it could act like the current
--debug_sql command-line option.


Of course, this XML format should be documented. For instance, on the
Wiki. I haven't done that so far because I haven't felt 100% sure that
it was an appropriate format. But I haven't thought of anything better.
 
-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]