External Interfacing - stuck with passing a file stream pointer

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

External Interfacing - stuck with passing a file stream pointer

Günther Schmidt
Hi,

I'm experimenting with the libxslt from the Gnome Project.

Eventhough I don't really have a clue what I'm doing I did get Dolphin to interface with libxslt.dll and  accomplished some xml/xslt transformations.

There's one libxslt funtion where I'm totally lost.

They part where one of the arguments is supposed to be a file pointer so the libxslt will use it to write its output onto it.

I have *no* clue how to do that.

Help!

Günther


Reply | Threaded
Open this post in threaded view
|

Re: External Interfacing - stuck with passing a file stream pointer

Martin Rubi
I'm just guessing (I've never used this), but could it be something like
this ?

file := (StdioFileStream write: 'bla.txt').

YourLibrary default yourFunction: file asParameter.

file close.

If the function you are calling stores the pointer, then probably you must
keep a reference to the StdioFileStream instance somewhere too.

regards

> Hi,
>
> I'm experimenting with the libxslt from the Gnome Project.
>
> Eventhough I don't really have a clue what I'm doing I did get Dolphin to
interface with libxslt.dll and  accomplished some xml/xslt transformations.
>
> There's one libxslt funtion where I'm totally lost.
>
> They part where one of the arguments is supposed to be a file pointer so
the libxslt will use it to write its output onto it.
>
> I have *no* clue how to do that.
>
> Help!
>
> Günther


Reply | Threaded
Open this post in threaded view
|

Re: External Interfacing - stuck with passing a file stream pointer

Günther Schmidt
In reply to this post by Günther Schmidt
The previous steps worked, this part is where I'm stuck. I haven't really started thinking in C.

Well it's basically about this function (copied and pasted from http://xmlsoft.org/XSLT/html/libxslt-xsltutils.html#xsltSaveResultTo ), frankly I have no idea how to implement this:



Function: xsltSaveResultTo

int xsltSaveResultTo (xmlOutputBufferPtr buf,
                                         xmlDocPtr result,
                                         xsltStylesheetPtr style)

Save the result @result obtained by applying the @style stylesheet to an I/O output channel @buf
buf: an output buffer
result: the result xmlDocPtr
style: the stylesheet
Returns: the number of byte written or -1 in case of failure.


Günther