Reorganizing examples of relative references resolution in A.3 of OPC

MURATA Makoto eb2m-mrt at asahi-net.or.jp
Mon Jun 9 04:52:18 CEST 2014


I made two mistakes.

First, web requests based the pack scheme are supported.
But this support is done by

  System.IO.Packaging.PackWebRequest

rather than

  System.Net.WebRequest

Second, PackUriHelper can generate URIs of the pack
scheme.  For example,

  let baseUri = new Uri("http://www.example.com", UriKind.Absolute)
  let part = new Uri ("/foo", UriKind.Relative)
  let packUri = PackUriHelper.Create(baseUri, part)

  System.Console.WriteLine("generated uri: {0}", packUri);;

returns

  generated uri: pack://http:,,www.example.com,/foo

Regards,
Makoto



Second,


2014-06-08 15:35 GMT+09:00 MURATA Makoto <eb2m-mrt at asahi-net.or.jp>:

> Folks,
>
> I did some more experiments.  My conclusion is
> that .Net (with the possible exception of Web
> Presentation Foundation) does not support the
> pack scheme.
>
> I thought that System.Uri of .Net can handle
> the pack scheme.  But my experiment suggest
> otherwise.  For example,
>
>  new Uri(@"pack://http%3a,,www.site.com,windows,p1.xps/",
> UriKind.Absolute)
>
> raises a UriFormatException.  I tried all examples shown
> in 29500-2, but none of them parsed correctly.
>
> I also tried
>
>   WebRequest.Create (@"pack://http%3a,,www.site.com,windows,p1.xps/");;
>
> But I got an UriFormatException, again.
>
> PackUriHelper supports the creation of part names,
> which begin with "/".  But they do not appear to support
> the creation of park URIs.
>
> Regards,
> Makoto
>
>
>
> 2014-06-07 15:27 GMT+09:00 MURATA Makoto <eb2m-mrt at asahi-net.or.jp>:
>
> Folks
>>
>> I did an experiment using F# of Visual Studio 2010 and
>> .Net framework 4.
>>
>> For each bullet in the itemized list in A.3., I created an
>> example string.  Then, I executed
>>
>>   PackUriHelper.CreatePartUri(new Uri(x, UriKind.Relative))
>>
>> for each example string.  The source program and the
>> output is available at:
>>
>> https://www.assembla.com/spaces/IS29500/wiki/OPC_Annex_A3_Testing
>>
>>
>> It is not easy to interpret the result of this experiment.
>> One could argue that each input string is a part name.
>> One could also argue that each input string is merely
>> an erroneous input and that the resulting string is a
>> part name.  One could also argue that each string is
>> a Unicode string that can be converted to a part name.
>> We can discuss in Prague.
>>
>> Regards,
>> Makoto
>>
>>
>> 2014-06-05 15:27 GMT+09:00 MURATA Makoto <eb2m-mrt at asahi-net.or.jp>:
>>
>>
>>> Folks,
>>>
>>> I am not thiking about how examples (A.3) of resolution
>>> of relative references in Annex A should be improved.
>>>
>>> A.3 has caused a lot of confusions, since it does not distinguish two
>>> cases: relatvies references beginning with "/" and those not beginning
>>> with it.  The right approach is to clearly use resolution of relative
>>> references as specified in RFC 3986 and demonstrate examples.  In
>>> particular, we should show what the remove_dot_segments and merge
>>> procedures in RFC 3986 do as part of this resolution.
>>>
>>> A related problem is the absense of base URIs in A.3.  Obviously,
>>> base URIs play key reoles in the resolution of relative
>>> references.  Why are they not mentioned?  As a result, all examples
>>> in A.3 appear to begin with "/".  There are no examplses that
>>> do not begin with "/".
>>>
>>> I am trying to reogranize examples thoroughly now.  I will
>>> report back in a few days.
>>>
>>> Regards,
>>> Makoto
>>>
>>
>>
>>
>> --
>>
>> Praying for the victims of the Japan Tohoku earthquake
>>
>> Makoto
>>
>
>
>
> --
>
> Praying for the victims of the Japan Tohoku earthquake
>
> Makoto
>



-- 

Praying for the victims of the Japan Tohoku earthquake

Makoto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.vse.cz/pipermail/sc34wg4/attachments/20140609/c60c91d2/attachment.html>


More information about the sc34wg4 mailing list