Re: [xslt] ToString or size of output.
- From: Daniel Veillard <veillard redhat com>
- To: xslt gnome org
- Subject: Re: [xslt] ToString or size of output.
- Date: Tue, 14 Aug 2001 16:05:34 -0400
On Tue, Aug 14, 2001 at 08:25:28PM +0200, crille wrote:
> Hi,
>
> I'm sorry if this is an easy one, but i been banging my head into this one
> for a very long time.
>
> 1)
> Is there a way of getting the output returned as a string.
>
> ie.
> char *string;
> string = xsltSaveResultToString(result,cur);
>
> or something?
http://mail.gnome.org/archives/xslt/2001-July/msg00166.html
note the bug I pointed in my answer. Seems I will have to provide
something similar.
> I need to now acactly how big the string is before using it.
That libxml can't do ! I can't tell you in advance what will be the
size of a serialized tree, far too complex, depends of encoding too...
> 2)
> How can i retrieve a PI from the xmldoc? I need to findout the value of the
> <?xml-stylesheet ?> tag from the xml file before parsing.
Hum, before parsing it's hard to tell what's in a file.
Once parsed locating a stylesheet PI is possible. look at
xsltLoadStylesheetPI(style)
and how it's used in xsltproc.
Daniel
--
Daniel Veillard | Red Hat Network http://redhat.com/products/network/
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]