output method="text" in C program

Martin Gürtler <[email protected]> Fri, 09 Aug 2013 10:22:16 +0200
Newsgroups gmane.comp.gnome.lib.xslt
Message-ID <[email protected]>
Hi,

(this is my first mailing to this list; I have been using libxml and libxslt for
less than a year)

I am desperately trying to apply an xslt that is supposed to produce text and
not xml.

The transformation works with xsltproc(.exe) as expected, which suggests the
stylesheet is OK.

I wonder how to apply the transformation in a C program. For xml output, I have
been using successfully xsltApplyStylesheet, but this is supposed to produce
xml, as the result is an xmlNodePtr. What would be the correct way to either get
a char-Buffer or produce an ouput file directly? I could change the output
method to xml and read the content of the root element, but I guess there is a
better way.

Looking at xsltproc.c, there seem (at first glance) no special provisions
required for text output. Unfortunately, if I use xsltApplyStylesheet naively
(as it works with output method="xml") , the application crashes.

Any enlightenment is highly appreciated,

Martin