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

Where is the problem? That's what is is supposed to return.

> - some of my stylesheets specify html or plain text
> -  for plain text, xmlDoc.serialize() prints
> out an XML header

Hmm, i just built a small test case and can _not_ verify this.
What's the version of your libxslt? Can you provide us with a 
little test case? Are your shure you didn't forget the 
'omit-xml-declaration="yes"' attribute in the xsl:output tag?

> Perhaps there is some way to query the xmlDoc to
> find the content type?  Or should one always use
> children().serialize() instead?

What do you mean by 'content-type' ? That's a concept of HTTP
and not of XML. The content type is part of the semantic of a 
document (an text/html page _can_ be valid XML) and the library
has no idea about that. Or do you want to know the output type

 Ralf Mattes

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