Please support forward slashes for UNC file names
-------------------------------------------------
Key: XERCESC-1738
URL: https://issues.apache.org/jira/browse/XERCESC-1738
Project: Xerces-C++
Issue Type: Wish
Components: Utilities
Affects Versions: 2.7.0
Environment: WinXP, Vista
Reporter: Soren Soe
XercesDOMParser cannot parse/open XML documents specified in UNC path if the
path uses forward slashes.
For example //server/directory/file.xml causes a SAXParseExecption to be thrown.
I am not clear on the exact requirements of the UNC format (are forward slashes
even allowed), but nevertheless, most windows tools today support both forward
and backwards slashes.
I debugged through the code. UNC file paths with forward slashes could be
supported easily with an extra test for two forward slashes added to
XMLPlatformUtils::isRelative() in win32platformutils.cpp.
bool XMLPlatformUtils::isRelative(const XMLCh* const toCheck
, MemoryManager* const /*manager*/)
...
//
// If it starts with a double slash, then it cannot be relative since
// it's a remote file.
//
if (isBackSlash(toCheck[0]) && isBackSlash(toCheck[1]))
return false;
...
It appears all that is needed is to check for two forward slashes also.
Thank you.
Soren Soe
--
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]