object instance data to docbook, xml, pdf, etc?

Brad Clements bkc at Murkworks.com
Fri Jul 11 17:23:14 EDT 2003


_
"David Mertz, Ph.D." <mertz at gnosis.cx> wrote in message
news:lchD/kKkXYHM092yn at gnosis.cx...
> Harry George <harry.g.george at boeing.com> wrote previously:
> |We are outputting the instance data, sort of like Gnosis xml_objectify,
> |but to docbook DTD.
>
> You *could* use XSLT to transform the gnosis.xml.pickle output into
> DocBook (I'm pretty sure you mean that, objectify goes in the other
> direction generic-XML -> python).
>
> However, I personally find XSLT extremely awkward.  If someone doesn't
> give you the done-deal, you might find it useful to take
> gnosis.xml.pickle and fork it for your desired DocBook/XML output.  All
> the issues about traversing objects is handled, you should pretty much
> be able to just look for the XML tags that get written, and substitute
> those as needed.


He could modify the xml.pickle code this way, but what if his requirements
change in 5 months?

I think it's better just to dump the pickle and bite the bullet on xslt
sheets for conversion.

I use gnosis.xml.pickle's xml output to load dynamic tables in IE
(client-side stylesheets convert to html on the fly) and I use a different
sheet to generate PDFs with FOP.  Oh, and last week I find I also have to
output data into Excel compatible form. I haven't decided if I'll write out
a CSV. Either directly from the Python objects, or using XSLT to convert the
gnosis.xml.pickle output or write to "native Office 2003 XML format".

XML can be a pita, but it has paid off for me anyway.












More information about the Python-list mailing list