Thanks David,
I saw the example for stream transformations.
Where this works in the example:
// Our input streams... istrstream theXMLStream(theInputDocument, strlen theInputDocument)); istrstream theXSLStream(theStylesheet, strlen(theStylesheet));
// Do the transform.
theResult = theXalanTransformer.transform(&theXMLStream, &theXSLStream, cout);
If I change cout to an ostrstream, this does not compile under MSVC++ 6:
ostrstream theOStream();
theResult = theXalanTransformer.transform(&theXMLStream, &theXSLStream, theOStream);
Is there a way to get an XSLTResultTarget from an ostrstream? I am not that fammiliar with ostrstream.
Thanks for the info, PaulReg
From: [email protected] To: [email protected] Subject: Re: Help passing buffer through Xalan to Xerces Date: Mon, 10 Sep 2001 14:37:47 -0400
There's already a sample for doing stream transformations. See Samples/StreamTransform for more information.
The sample transforms to cout, but you can also transform to an ostrstream and use the resulting buffer as input to the parser.
Dave
"Paul Reg"
<[EMAIL PROTECTED] To: [email protected]
.com> cc: (bcc: David N Bertoni/CAM/Lotus)
Subject: Help passing buffer through Xalan to Xerces
09/10/2001 01:27
PM
I have an application that uses Xerces sax parser to process an XML document. I want to modify it to first apply an XSL file, using Xalan, to the document then pass it to the Xerces parser.
The document is a NULL terminated string in memory.
What form of the XSLTInputSource do I use for passing this string into transform()?
What form of the XSLTResultTarget can I get the results out so that I can pass it into Xerces parse() method of an XMLReader?
I am currently using an MemBufInputSource as the input to the parse() method, so any XSLTResultTarget compatable with that would work great.
I don't want to use a temp file for any of this so tell me if there is a way to do it using memory buffers.
If there is a better way to do this, that you know of, please let me know that too.
Examples in C++ would be great, or if there is an example of this already out there please point me to it!
Thanks, PaulReg [EMAIL PROTECTED]
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
From: [email protected] To: [email protected] Subject: Re: Help passing buffer through Xalan to Xerces Date: Mon, 10 Sep 2001 14:37:47 -0400
There's already a sample for doing stream transformations. See Samples/StreamTransform for more information.
The sample transforms to cout, but you can also transform to an ostrstream and use the resulting buffer as input to the parser.
Dave
"Paul Reg"
<[EMAIL PROTECTED] To: [email protected]
.com> cc: (bcc: David N Bertoni/CAM/Lotus)
Subject: Help passing buffer through Xalan to Xerces
09/10/2001 01:27
PM
I have an application that uses Xerces sax parser to process an XML document. I want to modify it to first apply an XSL file, using Xalan, to the document then pass it to the Xerces parser.
The document is a NULL terminated string in memory.
What form of the XSLTInputSource do I use for passing this string into transform()?
What form of the XSLTResultTarget can I get the results out so that I can pass it into Xerces parse() method of an XMLReader?
I am currently using an MemBufInputSource as the input to the parse() method, so any XSLTResultTarget compatable with that would work great.
I don't want to use a temp file for any of this so tell me if there is a way to do it using memory buffers.
If there is a better way to do this, that you know of, please let me know that too.
Examples in C++ would be great, or if there is an example of this already out there please point me to it!
Thanks, PaulReg [EMAIL PROTECTED]
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
