You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Milind Joshi <mi...@vsnl.net> on 2001/06/06 20:53:42 UTC

FW: Large memory buffers with Xalan/Xerces

Hi Gurus,
Please let me introduce myself as a humble user of your products.

I'm trying to do the following with Xalan C++ 1.1/Xerces C++ 1.4.0, Windows
NT 4.0, SP6, MSVC6 using the binary distribution:

1. I have an XML document, and a corresponding XSL document in memory - in a
null-terminated char*
2. I convert this to an istrstream, then to an XSLTInputSource using the
appropriate constructors.
3. I try to 'process' the XML buffer, using the XSL buffer with the
XLSTEngine.

This somehow causes an exception when the files are large:
Fatal Error at (file Memory buffer, line 4899, column 15): Expected comment
or processing instruction

This error occurs in another large project of mine, where it is diffucult to
demonstrate, so I changed the StreamTransform.cpp that comes with the Xalan
C++ distribution and could successfully reproduce this problem.

The strange thing is - this problem does not appear when I give the file to
the processor. Is there some particular way to build a buffer? I notice that
when I strip these files and make them 'small', the file is processed
without any problem.

Maybe I'm doing something seriously wrong/stupid. If so, please forgive me
and show me the way.

I attach the files, please help me.

Best Regards,
Milind Joshi