[XML-SIG] Python / XML / XSLT vs. Cocoon for website server side

John J Lee jjl at pobox.com
Fri Aug 15 18:58:30 EDT 2003

On Thu, 14 Aug 2003, Richard Johannesson wrote:
> >Can someone who has tried doing logic in XSLT stylesheets give a
> >bit of insight on how to do logic in XSLT?  My understanding is
> >that XSLT is good for recursive pattern matching and generation of
> >content from patterns/templates, but not good once you go beyond
> >that.  Can someone confirm that or show how complex logic is done
> >in XSLT stylesheets?  Would that logic be readable and
> >maintainable?
> I've just read that this is possible. Not looked into how its done yet. Only
> done some simple XSLT transformation so far - creating html doc from a few
> xml docs using XSLT. Thanks for the warning. Theoretically, if the logic can
> be stored in a language independent format - this sounds ideal. But, most

What does that L stand for in XSLT?  XSLT is a language.  The great thing
about XSLT is that everybody hates it equally <0.7 wink>.

> Just seems that XSLT will provide also language independence. Most major
> languages support XSLT. Trying to decide if its worth the cost in terms of

All major languages support python, too <0.2 wink>.

Surely, XSLT should be used when either: 1. it's clear that the problem
nicely fits XSLT's way of doing things 2. it turns out to be necessary in
order to interoperate with someone/something who doesn't use Python.
Otherwise, use Python.  This is just like any other 'little language' --
the 'X' in the name doesn't have magical properties.

[If that sounds like a rant, well, maybe it is, but it isn't really
directed against anyone here -- just the world in general ;-)]

Hmm, maybe there are some circumstances where XSLT has security advantages
too (but I think it's Turing-complete, isn't it)?

> Would be nice if some best practices could be created on Python / XML. Maybe
> if we get enough feedback, this might lead to something like that. Just too
> much confusion out there. One major strength Python has is its
> documentation. If it would go even further and start capturing best
> practices - it would be in a league of its own. Make it easier for newcomers
> to pick-up the language and start implementing things properly.

s/best practices/rules of thumb/, and I might agree.


More information about the XML-SIG mailing list