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 Steve Smith <ss...@pnl.gov> on 2005/03/15 18:20:04 UTC

Relative paths in C++ on Macintosh OS X

I'm having difficulty getting the Xerces-C++ parser to use relative 
paths on Mac OS X. Using absolute paths works fine.

But when I try to pass the parser a path such as
	../../../configuration.xml

I get an error:
The primary document entity could not be opened. 
Id=//../../../configuration.xml

Do I need to use the routines in MacOSPlatformUtils.hpp to help with 
this somehow?

Any help on this would be appreciated.

Thanks,

Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: Relative paths in C++ on Macintosh OS X

Posted by James Berry <ja...@jberry.us>.
Steve,

I don't know of a problem in this area. I've used relative paths 
successfully. But your setup may be somewhat different.

Can you provide more information about the context in which  you're 
seeing this issue? Build environment? Compiler? What API you're passing 
the relative path to? Can you duplicate the issue with a test program?


On Mar 15, 2005, at 9:20 AM, Steve Smith wrote:

> I'm having difficulty getting the Xerces-C++ parser to use relative 
> paths on Mac OS X. Using absolute paths works fine.
>
> But when I try to pass the parser a path such as
>     ../../../configuration.xml

Note that it's puzzling why the path above gets converted into an 
absolute path as below... It looks like the current directory is root. 
Xerces should be calling getcwd to fetch the current directory (and 
does so at XMLParsePathToFSRef_X in MacOSPlatformUtils.cpp.

-jdb

>
> I get an error:
> The primary document entity could not be opened. 
> Id=//../../../configuration.xml
>
> Do I need to use the routines in MacOSPlatformUtils.hpp to help with 
> this somehow?
>
> Any help on this would be appreciated.
>
> Thanks,
>
> Steve
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org