Hi guys, Since I don't have Jira rights to comment on this bug, I am sending my notes to the list:
I came across the same problem when running 2.8 on Leopard. The native transcoder is causing this error. Even if you use ICU though, there is still a problem with MacOS Posix implementation. In /src/xercesc/util/Platforms/MacOS/MacPosixFile.cpp at line #114, the open function calls TranscodeUniCharsToUTF8 in MacOSPlatformUtils and this helper function uses CoreServices. Even though this doesn't cause any crashes, it dumps bunch of "The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec(). Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTION ALITY___YOU_MUST_EXEC__() to debug." messages on the screen. To suppress these messages, I've used XML::transcode instead. In 3.0, MacOS uses pure Posix implementation. You can either merge the PlatformUtils implementation from 3.0 to 2.8 or simply replace TranscodeUniCharsToUTF8 call with XML::transcode in MacPosixFile.cpp. If you're interested i can send my changes, but it's a pretty easy fix. Cheers, -Ozgur Sahoglu -----Original Message----- From: Roberto Rigamonti [mailto:[EMAIL PROTECTED] Sent: Monday, May 05, 2008 12:14 PM To: [email protected] Subject: Re: Writing an XML Schema using Xerces and C++ It works perfectly! Thanks a lot (it's more than a week that I'm going crazy with those problems!! :D)!!!! Roberto Alberto Massari wrote: > You need to turn on the feature XMLUni::fgDOMWRTFormatPrettyPrint on the > DOMWriter object (the sample has it disabled by default, but can turn it > on by specifying the -wfpp=on option on the command line. > > Alberto > > Roberto Rigamonti wrote: >> Hi, I've missed the CreateDOMDocument example :D >> Merging those two samples I was able to correctly create the Schema, >> thank you very much!! :) >> I've also noticed that the segfaults were caused by an incorrect >> handling of pointers due to the continuous cut&paste over samples. >> Now only a simple question remains open for me: how can I correctly >> format the resulting document? I mean, I found no way to correctly >> insert newlines in the document: I've tried using the setNewLine() >> method of DOMWriter passing "\n" and "\r\n" (even if I'm under Linux), >> but none of them works... >> Thank you again for your help! >> Roberto
