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 Boris Kolpackov <bo...@codesynthesis.com> on 2007/03/15 21:29:01 UTC

URI format in noNamespaceSchema location

Hi,

It was reported on the xsd-users mailing that Xerces-C++ on
Windows does not like the noNamespaceSchema attribute value
in the form: "file://C:\foo.xsd". The strange thing is that
it accepts "file:/C:\foo.xsd" (without second /). I think
double slash is the correct format. Can somebody explain
what's going on or should I file a bug report?


thanks,
-boris


-- 
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding


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


Re: URI format in noNamespaceSchema location

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi Alberto,

Alberto Massari <am...@datadirect.com> writes:

> I think the correct format is file:///C:\foos.xsd (three slashes,
> because the server name is not specified).

I believe you are correct per RFC1738. When I was testing this I had
the Visual Studio IDE open and there a link to the build report was
given as "file://c:/...". I thought it got to be right... :-)

thanks,
-boris
-- 
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding


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


Re: URI format in noNamespaceSchema location

Posted by Alberto Massari <am...@datadirect.com>.
Hi Boris,
I think the correct format is file:///C:\foos.xsd (three slashes, 
because the server name is not specified). But I never understood 
URI/URL/IRI very much, so...

Alberto

At 20.29 15/03/2007 +0000, Boris Kolpackov wrote:

>Hi,
>
>It was reported on the xsd-users mailing that Xerces-C++ on
>Windows does not like the noNamespaceSchema attribute value
>in the form: "file://C:\foo.xsd". The strange thing is that
>it accepts "file:/C:\foo.xsd" (without second /). I think
>double slash is the correct format. Can somebody explain
>what's going on or should I file a bug report?
>
>
>thanks,
>-boris
>
>
>--
>Boris Kolpackov
>Code Synthesis Tools CC
>http://www.codesynthesis.com
>Open-Source, Cross-Platform C++ XML Data Binding
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org


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


Re: URI format in noNamespaceSchema location

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi Jesse,

"Jesse Pelton" <js...@PKC.com> writes:

> If I'm correct in my interpretation, the canonical URI for the file
> system path "C:\foo.xsd" is "file://localhost/C:/foo.xsd".  Since <host>
> will generally be assumed to be "localhost" if omitted, it's probably
> safe to use the short form "file:///C:/foo.xsd".

RFC1738 says:

"As a special case, <host> can be the string "localhost" or the empty
 string; this is interpreted as `the machine from which the URL is
 being interpreted'."

So I would say "file:///C:/foo.xsd" is as "canonical" as
"file://localhost/C:/foo.xsd".

thanks,
-boris


-- 
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding


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


RE: URI format in noNamespaceSchema location

Posted by Jesse Pelton <js...@PKC.com>.
Hmm.  I don't think either is correct.  According to RFC 1738, the
syntax for a file: URI is file://<host>/<path>.  (RFC 1738 is obsolete,
but neither 2396 nor 3986 provides any specific guidance on the file:
scheme, and I don't think they contradict 1738.)  Since the only path
separator allowed for URIs is a forward slash, backslashes in Windows
paths should be turned into forward slashes.

If I'm correct in my interpretation, the canonical URI for the file
system path "C:\foo.xsd" is "file://localhost/C:/foo.xsd".  Since <host>
will generally be assumed to be "localhost" if omitted, it's probably
safe to use the short form "file:///C:/foo.xsd".

Since there's a lot of confusion and ambiguity about file: URIs, I
tested both forms above with Firefox 2 and IE 7.  Both forms worked in
both browsers.  However, this is not definitive; both browsers also
accepted the forms with backslashes, though Firefox transformed the
address into the above short form.  Whatever form you use, IE turns it
into a local path ("C:\foo.xsd"), which clearly is not a URI.

-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Boris Kolpackov
Sent: Thursday, March 15, 2007 4:29 PM
To: c-dev@xerces.apache.org
Subject: URI format in noNamespaceSchema location


Hi,

It was reported on the xsd-users mailing that Xerces-C++ on
Windows does not like the noNamespaceSchema attribute value
in the form: "file://C:\foo.xsd". The strange thing is that
it accepts "file:/C:\foo.xsd" (without second /). I think
double slash is the correct format. Can somebody explain
what's going on or should I file a bug report?


thanks,
-boris


-- 
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding


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


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