[ 
https://issues.apache.org/jira/browse/XERCESC-1738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520594
 ] 

Soren Soe commented on XERCESC-1738:
------------------------------------

Thanks.  I can see that file:////server/directory/file.xml is indeed supported.

I guess my question really is why "//server/directory/file.xml " (without the 
file://)  is not supported when "\\server\directory\file.xml" is supported?   
It seems supporting the former would require just a check for the two forward 
slashes.   System calls on windows have no problem working with files specified 
in either form.

> 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]

Reply via email to