Axel,

my answer is below.

> Am Mittwoch, 6. April 2005 20:48 schrieb Ovanes Markarian:
> > Hi all!
> >
> > I am trying to open a local file under cygwin using either the URI or
> > local unix name for it. Under Win32 (XP) this code works fine, but
> > under Cygwin it fails. I tried a lot of approaches, like splitting
> > the path into the systemId and relative path or passing the entire
> > path.
> >
> > Can someone suggest what could be wrong here? I am using Xerces-C
> > 2.6.0.
> >
> > //will automatically convert to XMLCh*
> > MyStringClass basePath="file:///c:/someDir/";
> > MyStringClass relFilePath="./someXMLfile.xml";
> 
> Hi Ovanes,
> 
> how is the conversion in MyStringClass done? Did you verify that it's 
> correct (e.g. can you successfully re-convert, can you successfully 
> convert well-known XMLCh-strings)? If you have an invalid conversion, 
> nothing would help you afterwards...

The string class works fine. It uses internal Apache transcode routines
and has a const XMLCh* operator. This is not a problem.


> > URLInputSource is(static_cast<const XMLCh*>(basePath),
> >                   static_cast<const XMLCh*>(relFilePath));
> >
> > BinInputStream* stream=is.makeStream();
> > XMLByte bytes[1024]={0};
> > size_t read=0;
> >
> > do
> > {
> >     read=stream->readBytes(bytes, 1024);
> > }while(read==1024);
> 
> And what is the meaning of the do-while-loop? I can't see any sense... 
> What is actually going wrong?

This sample loop has no meaning. I only tried to open an InputSouce and
read it. As the XMLParser would do this as well. On Win32 it works fine
on cygwin it fails.

> 
> > I also tryied using LocalFileInputSource with URI, UNIX like path
> > (/cygdrive/c/...) and windows path (c:\\...) with no luck.
> 
> Did you try to omit the leading './' in relFilePath?
This did not work too.


> BTW: Did you compile xercesc-2.6 under cygwin? If so, which version of 
> gcc did you use? I'm trying to compile xercesc under cygwin without 
> success until now due to linker errors, so this information might help 
> me here.

The problem is not a gcc version, but the make file error. Thanks to my
collegue Franz Brandel who was reading makefiles and found it.
So here the build instruction:
1. set the ${XERCESCROOT} environment variable to the path where xerces
is via the export command:
bash$ export XERCESCROOT=/cygdrive/[drive]/path...
Don't forget here C in XERCES_C_ROOT
2. Everything else depends on the error in the makefile in the
${XERCESCROOT}/obj directory.
Therefore please correct the ${XERCESCROOT}/obj/Makefile

        DEPDOM_OBJECTS=$(wildcard $(PLATFORM)/depdom/*.o)

(line 71) to

        DEPDOM_OBJECTS=$(wildcard $(PLATFORM)/depdom/*.o $(PLATFORM)/*.o)


If you call runConfigure script afterwards it might overwrite this line,
so double check it after a call to runConfigure.

> 
>                       Axel
> 
> -- 
> Humboldt-Universität zu Berlin
> Institut für Informatik
> Signalverarbeitung und Mustererkennung
> Dipl.-Inf. Axel Weiß
> Rudower Chaussee 25
> 12489 Berlin-Adlershof
> +49-30-2093-3050
> ** www.freesp.de **
> 
> 

Who can help me with URLInputSource?????? Please!


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to