Forum OpenACS Q&A: Re: Anybody have the code to apply_xsl?

Collapse
Posted by Barry Books on
I'm trying to build a pdf from xml in the database and put it back into the database. It seems a bit silly to pull it out and then put it back in because I need to batch about 20,000 of them every night.
Collapse
Posted by Bart Teeuwisse on
Barry,

if you find yourself taking the tDOM road, you can find an example of using tDOM for XSL conversion in http://cvs.openacs.org/cvs/openacs-4/contrib/packages/irc-logger/tcl/irc-logger-procs.tcl?view=auto&rev=1.6.

Including a custom Tcl function used in the transformation.

/Bart

Collapse
Posted by Andrei Popov on
As long as XML that is being pulled out is a valid one, yes...  Otherwise it might be advisable to pipe it through something like Tidy to at least close out tags and replace &'s <'s, >'s, etc. with named entities.  If that "XML" is user-drivven, there might be a problem.