Flexible Content Management System


XML data integration in PostNuke with Sablotron

Contributed by very interesting. po on Dec 06, 2001 - 08:09 PM

Briefly: i'm constructing a module (with Mutant 0.64: I hope its not needed to rewrite it completely in order to accomplish to 0.70...) able to integrate XML sources with PostNuke, using XSLT transformations with a Sablotron parser, preserving themes, look etc, in a very dirty but functionnal way.

In the past monts I have developed a very complex commercial site for a customer. For security and other architectural reasons I've decided to develop it in XML/XSLT with PHP/Sablotron on Apache. The XML data were (and are) dynamically generated by a MS-SQL2000 server with IIS5. The querying is made via HTTP calls to the (very smart) XML module of this RDBMS. MS engineers works well, but sometimes for us also.

Recently, during a Web peregrination, I've encountered Nuke and PostNuke, and were folgorated in the Damasco way.

My first attempts to integrate my code in blocks, tables etc via simple php scripts inclusion was successful, but not very sactisfying: for example, the themes, font styles, color codes were not inherited from the XSL templates, and so the environmental variables etc.

In effect, the XML/XSLT transformations were producing directly the final HTML code for the page/block, so the two environments were impossible to integrate: only inclusion were possible.

BUT: who says that the XSLT parser output HAVE TO BE HTML ? It could be PHP, why not ?

In my new module, XML/XSLT transformation produces PHP code (for the most part echo '...';) that is after EVAL(uated) by the PHP parser.

The only thing you have to do is to write

and so on in the XSL Template, insteadof


There are a certain number of troubles to solve and tricks to adopt in order to make all running and functionnal. But IT RUNS!

I think that this kind of technique can be useful for RSS and PostNuke's backend data sources integration.

If someone is interested in it, i wait for comments and I will respond to emails.

Thank you (And Czech Gingerall engineers) for your marvelous job!