Try using "arg:/_output" as the output URI. So,

                // create associative list to pass in parameters to
Sablotron
                char * arglist [] =
                {
                        "/_output",     NULL, 
                        NULL
                };
                char * pcOutBuf = NULL;

                int nError = (int) SablotProcess ("file:/myxsl.xsl",
        
"file:/myxml.xml",
                                                            "arg:/_output",
                                                            NULL,
                                                            arglist,
                                                            &pcOutBuf);
                // pcOutBuf should contain your XSL output, if no error
occurred

You might want to experiment with this a bit. I found out how
SablotProcessStrings called SablotProcess to figure out things. You may have
to set up arglist differently, that is, as

char * arglist [] = 
{
        "/_output", &pcOutBuf
        NULL
};

Under the covers, a thread context is created. If you want finer control of
things use SablotRunProcessor and SablotGetResultArg.

-----Original Message-----
From: Gabe Ernst-Edwards [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 07, 2000 10:35 AM
To: Sablotron Mailing List
Subject: [Sab] Returning XML in a buffer


Hello.  

I'm trying to programmatically do XSL transforms using Sablotron.  I'd like
to be able to handle two situations:  The first is that I have the source
XML and XSL in a memory buffer.  I always want the output XML in a memory
buffer.  I can handle this situation with SablotProcessStrings.  

The second situation is that I have URIs for the source XML and XSL.  Again,
I need the output XML in a memory buffer.  It seems that SablotProcess will
handle this for me, except that it will only output the XML to a URI.  Is
there a way that I can get the output into a buffer?  

Thanks

Gabe Ernst-Edwards
Principle Software Engineer, PegaCONNECT
Pegasystems Inc.

Reply via email to