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

Uche Ogbuji uche.ogbuji at fourthought.com
Fri Aug 15 08:11:41 EDT 2003


> >  - Have logic done in XSLT where possible
> 
> Ha. Ha. Ha.  Only a sick pervert would make a joke like that.
> 
> 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?

Depends on just what sort of "logic".  Mike Olson, for example, wrote a 
Web-based cribbage game in XSLT (as a 4Suite demo).  I'm seen even more 
outrageous things.  I think that the balance between what should go into the 
templates and what should go into support code is largely a matter of taste, 
and XSLT is certainly far more sophisticated than the average templating 
language.


> > Here are the assumptions I'm making:
> >  - XML to HTML transformations via XSLT will provide good platform
> > independence. .Net, J2EE, Python all support XSLT. So, if required to move
> > to different platform, this should be possible
> 
> Not to try to talk you out of XSLT, but there are other ways to
> gain platform independence.  Python is one good way.

I think he's including language in his concept of platform, which is not 
unreasonable.  XSLT does have the advantage that it is implemented in many 
languages.


> >  - XSLT/XML can generate just about any html page a CSS/template engine can
> 
> If you are saying that XSLT is a suitable tool for generating *any*
> HTML from XML, I'd be skeptical.  My belief is that there are
> complex transformations for which XSLT would *not* be suitable. 
> Again, is there an XSLT expert that can give an evaluation here?

As I mentioned, XSLT is more sophisticated than most other templating tools.  
Don't forget XSLT's extension framework.  I wouldn't say it can generate *any* 
Web page (way too strong a statement), but I would say it can generate almost 
any Web page I have personally encountered.


> > Is there much consulting work for XML/Python? Current customers are pretty
> > much exclusively ASP / ASP.net.

I wouldn't say there were many Python/XML customers out there.  But as with 
everything, it depends on where/how you look.


-- 
Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Introducing Anobind - http://www.xml.com/pub/a/2003/08/13/py-xml.html
XML Topic Maps by the book - http://www-106.ibm.com/developerworks/xml/library/
x-think19.html
Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h
tml
Python, Web services, and XSLT - http://www-106.ibm.com/developerworks/xml/libr
ary/ws-pyth13/
Perspective on XML: What is this 'agility'? - http://www.adtmag.com/article.asp
?id=8004





More information about the XML-SIG mailing list