Thanks for the help of everyone.
Everything is working fine now that I built everything using VC++ .NET
Both xerces and xalan compiled fine with VC++ 7.0. Only one problem in ExternalFunction sample in Xalan. The compiler is not able to find the correct XalanDOMString constructor in the following lines:
const XalanDOMString
getError() const
{
return XALAN_STATIC_UCODE_STRING("The square-root() function accepts one argument!");
}
My experience also tend to show that a C++ .NET application can not use VC6 binary distribution of Xalan. Most of it will work but it seems that there is some issues with the streams.
Thomas
-----Original Message-----
From: David N Bertoni/Cambridge/IBM [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 15, 2002 2:04 PM
To: [email protected]
Subject: RE: StreamTransform with Visual C++ .NET
If you rebuild Xerces, then you must rebuild _all_ of Xalan. The compilers
use two different run-time DLLs, and as a result, have two different heaps.
Xalan and Xerces require the same run-time heap is used. Your applications
must also follow this model, as well. See the FAQ:
http://xml.apache.org/xerces-c/faq-build.html#faq-11
Dave
|---------+----------------------------------->
| | [EMAIL PROTECTED]|
| | oftware.com |
| | |
| | 04/15/2002 10:43 AM |
| | |
|---------+----------------------------------->
>---------------------------------------------------------------------------------------------------------------------------|
| |
| To: [email protected] |
| cc: (bcc: David N Bertoni/Cambridge/IBM) |
| Subject: RE: StreamTransform with Visual C++ .NET |
>---------------------------------------------------------------------------------------------------------------------------|
It might start to work better when rebuilding xalan under .NET completely.
Compilation went through without a problem (a couple of warnings here and
there, that's all).
I am able to run the StreamTransform example now. But most of the other
example (and Xalan.exe including) are not working.
I get a popup with the following message in it:
Debug Assertion Failed!
Program Xalan.exe
File dbgheap.c
Line: 1132
_expression_: _CrtIsValidHeapPointer(pUserData)
The calling stack under the debugger is showing the problem on a delete.
My C++ is a little bit rusty, I must admit. Is this related to the
Microsoft debug library and the way it redefined the new/delete operator?
If yes, any idea on how to fix it? I think I remember that there might be a
way by excluding a specific debug library. I will try to validate that by
building the release version (instead of the debug one).
I am also in the process of building xerces in .NET. I am using the 1.6.0
version (to use the same as the one bundled with xalan). Is it ok or should
I/can I use the latest Xerces (1.7)?
Thomas
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Monday, April 15, 2002 12:22 PM
To: [email protected]
Subject: RE: StreamTransform with Visual C++ .NET
Sorry for the multiple emails. Reply All was just the easy way. I
will be more careful.
I am running on Windows 2000 server.
My email was not very clear, I think, that is why I sent a
clarification right after. The StreamTransform.exe from the binary
distribution is working fine, but if I try to rebuild it with VC++
7.0, then it does not work anymore.
I will investigate to try to understand better where the problem is
coming from.
Thomas
-----Original Message-----
From: David N Bertoni/Cambridge/IBM [
mailto:[EMAIL PROTECTED]]
Sent: Monday, April 15, 2002 11:58 AM
To: [email protected]
Subject: RE: StreamTransform with Visual C++ .NET
Thomas,
Please do not respond directly to me. Since I responded to your
email, you
can assume that I'm subscribed to the mailing list. I don't need
multiple
copies of emails flooding my inbox.
If you're using the binary distribution, I don't understand what VC++
7.0
has to do with anything. As long as you are running on NT or Windows
2000
you should not have any problems. We have not tested under XP, but I
can't
imagine in wouldn't work.
If there is some incompatibility as a result of VC++ 7.0, I think
that's a
bug that Microsoft ought to fix.
Dave
|---------+----------------------------------->
| | [EMAIL PROTECTED]|
| | oftware.com |
| | |
| | 04/15/2002 08:27 AM |
| | |
|---------+----------------------------------->
>
---------------------------------------------------------------------------------------------------------------------------|
|
|
| To: [EMAIL PROTECTED],
[email protected]
|
| cc:
|
| Subject: RE: StreamTransform with Visual C++ .NET
|
>
---------------------------------------------------------------------------------------------------------------------------|
I actually did not build xalan or xerces. I used the binary
distribution.
May this is what the problem is, but I was hoping that VC++ 6.0 built
DLLs
are "compatible" with VC++ 7.0 (I am probably too naive on that one).
I can definitely try to rebuild both Xerces and Xalan with .NET and
see if
the problem is fixed.
Thomas
-----Original Message-----
From: David N Bertoni/Cambridge/IBM [
mailto:[EMAIL PROTECTED]]
Sent: Monday, April 15, 2002 12:16 AM
To: [email protected]
Subject: Re: StreamTransform with Visual C++ .NET
When I last built with beta 2, everything worked fine, but things may
have
changed.
Since I don't have a copy of .NET, I can't build it to see what's
wrong.
You might try debugging through the code to see why the stream is
empty.
By the way, did you rebuild Xerces as well?
Dave
[EMAIL PROTECTED]
oftware.com To:
[email protected]
cc: (bcc:
David
N Bertoni/Cambridge/IBM)
04/14/2002 11:34 AM Subject:
StreamTransform with Visual C++ .NET
Hi there,
I am trying to make the StreamTransform example (from
Xalan-C_1_3-win32.zip
) with Visual C++ .NET (VC++ 7.0)
I can compile it fine but when I execute it I get the following
error:
Fatal Error at (file , line 1, column 1): The main XML document
cannot be
empty
StreamTransform Error:
The main XML document cannot be empty
Seems to be a problem with the handling of the stream. If I do not
use
stream (but reference the xml and xsl file directly), everything
works
fine.
Same exact code compiled in VC++6.0 is working fine.
Any ideas?
Thomas
