Re: [xslt] XSLT transformation to Plain Text using Python bindings requires using children().serialize()?



On Thu, Aug 22, 2002 at 09:00:05PM -0400, Craeg K Strong wrote:
> Hello:
> 
> I am writing a plugin for the Zope/Python environment that does
> XSLT transformations.  My original version worked with
> 4Suite/4XSLT, and I am now porting it to libxslt-py
> Yes, my name is Craeg and I'm a libxslt newbie.  ;-)
> 
> My very first unit test case initially failed, and
> although I have a workaround I wanted to ask about it.
> 
> The problem is this:
> 
> - the result of applyStylesheet always returns an instance of
> xmlDoc

  normal,

> - some of my stylesheets specify html or plain text

  fine,

> -  for plain text, xmlDoc.serialize() prints
> out an XML header

   of course, you asked to serialize an XML document, not to save the
result of an XSLT transformation for which you still need the stylesheeet
to know the xsl:output informations
  you must use the style.saveResultTo...() methods to produce the
serialization of the result of an XSLT transformation.
  That should have been obvious if you had spent the time to read 
the existing examples or the on-line documentation :-(
   http://xmlsoft.org/XSLT/python.html


Daniel


-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]