[
https://issues.apache.org/jira/browse/XERCESC-1877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725974#action_12725974
]
Mathieu Champlon commented on XERCESC-1877:
-------------------------------------------
I really believe this is a bug as Cygwin officially supports both path formats,
see http://www.cygwin.com/cygwin-ug-net/using.html#using-pathnames for instance.
Anyway, I'll try and come up with a patch to add a CygwinFileMgr.
> Windows paths are not handled properly under cygwin
> ---------------------------------------------------
>
> Key: XERCESC-1877
> URL: https://issues.apache.org/jira/browse/XERCESC-1877
> Project: Xerces-C++
> Issue Type: Improvement
> Components: Utilities
> Affects Versions: 3.0.1
> Environment: Cygwin with Xerces 3.0.1 built with ./configure and then
> make
> Reporter: Mathieu Champlon
> Priority: Minor
>
> The Cygwin version of Xerces appears to be using the PosixFileMgr and
> therefore isRelative returns false for a path starting with c: whereas it is
> totally valid.
> To reproduce the issue copy samples/data/personal.xml (and personal.dtd) into
> c:\tmp and run DOMCount as follows.
> $ pwd
> /cygdrive/c/Users/Mat/Desktop/dev/cpp/xerces-c-3.0.1/samples
> $ ls c:/tmp
> personal.dtd personal.xml
> $ ./DOMCount.exe c:/tmp/personal.xml
> Fatal Error at file , line 0, char 0
> Message: unable to open primary document entity
> '/cygdrive/c/Users/Mat/Desktop
> /dev/cpp/xerces-c-3.0.1/samples/c:/tmp/personal.xml'
> Errors occurred, no output available
> ***
> Then I added the following lines taken from WindowsFileMgr to
> PosixFileMgr::isRelative :
> #ifdef __CYGWIN__
> if (toCheck[1] == chColon)
> {
> if (((toCheck[0] >= chLatin_A) && (toCheck[0] <= chLatin_Z))
> || ((toCheck[0] >= chLatin_a) && (toCheck[0] <= chLatin_z)))
> {
> return false;
> }
> }
> #endif
> With the following line at the top of PoxisFileMgr.cpp :
> #include <xercesc/util/XMLUniDefs.hpp>
> I recompiled the samples and ran DOMCount once again :
> $ ./DOMCount.exe c:/tmp/personal.xml
> c:/tmp/personal.xml: 67 ms (37 elems).
> The #ifdef __CYGWIN__ is probably not the way to go but it shows exactly
> where the problem is.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]