Preferred tool for folding XML into HTML

Laurent Szyster laurent.szyster at q-survey.be
Tue Jan 8 06:04:59 CET 2002


Martin von Loewis wrote:
> 
> russell_turpin at hotmail.com (Russell Turpin) writes:
> 
> >   XML (dynamic) + HTML template (static) -> final HTML
> >
> > What are now the preferred tools for doing this?
> 
> I'd recommend to use XSLT. The HTML template would become an XSLT
> stylesheet, but appart from that, this is precisely what XSLT was
> invented for.

XSLT also gets my vote.

By the way, I advise you to pick wathever XSLT engine available
on your platform and pipe the XML into it from Python. An XSLT
engine written in Python is a non-sense. Providing Python binding
to an XSLT library is *The Right Thing* to do.

Just make sure you keep your XSLT style sheets simple and don't
make them do anything else than "render". This is your chance to
split logic from presentation ... and have portable stylesheets.

If you want to use the same C libraries everywhere, I suggest
you get the Python binding to libxslt:

  http://www.rexx.com/~dkuhlman/libxsltmod.html

If your target platform is Windows and you hate compiling source
code and love COM, then use the XLST engine in MSXML.DLL.


Laurent.



More information about the Python-list mailing list