Re: XML output to XSLT



On Tue, 2006-11-28 at 18:02 +0100, Murray Cumming wrote:
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.

Actually, looking at that code shows that it already outputs the XML to
stdout. So, the answer is: Start glom from a terminal and watch the
terminal when you generate a report.

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]