On 3/4/2010 4:37 AM, Steven Gerrard wrote:
Hi,
Sorry for taking this long to reply, I've been a little under the weather.
Here's a case, but it's important to note this is reproducable for EVERY
xml input longer than 1423 characters:
First, I've added XalanTransformToStream to XalanCAPI, as follows:
XALAN_TRANSFORMER_EXPORT_FUNCTION(int)
XalanTransformToStream(
istrstream *pTheXMLStream,
istrstream *pTheXSLStream,
XalanHandle theXalanHandle,
ostrstream *pTheOutput,
char *pszError,
int cbError)
{
int status = 0;
ostrstream theOutputStream;
XalanTransformer* const theTransformer =
getTransformer(theXalanHandle);
MemoryManager& theMemoryManager =
theTransformer->getMemoryManager();
status =
theTransformer->transform(pTheXMLStream,
XSLTInputSource(pTheXSLStream, theMemoryManager), *pTheOutput);
if (status != 0)
{
strncpy(pszError, theTransformer->getLastError(), cbError);
pszError[cbError] = '\0';
}
return status;
}
Adding C++ classes to what are supposed to be C APIs doesn't make a lot
of sense. Is this just for testing purposes?
Since you're just transforming to an ostrstream, this should be easy to
reproduce. I'll take a look at it.
Dave