Codesample for xml/xslt transforming

Harry George harry.g.george at boeing.com
Tue Sep 9 09:15:39 CEST 2003


"Thomas Guetttler" <guettli at thomas-guettler.de> writes:

> Am Tue, 09 Sep 2003 14:45:54 +0200 schrieb Axel Straschil:
> 
> > Hello!
> > 
> > Im fouling around with xml/xslt and zope. 
> > Now, im seraching for a simple codesample or link
> > for a simple xslt-tranformation in python and libxml
> > or 4Suite.
> > I've test.xml, test.xsl or two vars with the code
> > and wan't to transform it. 
> > Google just helped me for C ...
> 
> 4suite contains examples and tests. You could see how they work.
> 
> BTW, I used to waste a lot of time with xslt. 
> I think you are most of the time quicker with SAX for
> parsing XML and "print" to create XML.
> 
>  thomas
> 

I came to the same conclusion.  XSLT's declarative paradigm runs out
of gas just when the problem gets interesting.  E.g., when the
topology of the incoming data does not match that of the outgoing
data.  From there on in, you are tangled in xml-based procedural code.

What I'd like to see is a good pattern or even code to help set up the
SAX and print code given a neutral representation of the incoming and
outgoing formats.  The neutral reps should be generated from SQL,
XSchema, RELAX/NG, csv headers, etc.  Anything like that out there?


-- 
harry.g.george at boeing.com
6-6M31 Knowledge Management
Phone: (425) 342-5601




More information about the Python-list mailing list