<div dir="ltr"><div>Dear colleagues,</div><div><br></div><div>I am still wondering if the itemized list in A.3 of OPC </div><div>is needed.  How is the itemized list implemented in</div><div>src\Base\System\IO\Packaging\PackUriHelper.cs ?</div>
<div><br></div><div>First, given a string x, </div><div><br></div><div>  PackUriHelper.CreatePartUri(new Uri(x, UriKind.Relative))</div><div><br></div><div>performs Steps 1, 2, 3, 4, 5, 6 and 9 but does not support</div><div>
Steps 7 or 8.  In particular, percent encoded backslashes</div><div>are converted to verbatim slashes by Steps 4 and 5.</div><div>Multiple consecutive forward slashes (the target of Step</div><div>7) does not cause an error, but a trailing forward slash</div>
<div>(the target of Step 8) causes an argument error.</div><div><br></div><div>Second,</div><div><br></div><div>  PackUriHelper.Create(baseUri,new Uri(x, UriKind.Relative))</div><div><br></div><div>reports an error when x contains what is touched by Steps</div>
<div>1, 2, 3, 4, 5, 6, 8, and 9, where baseUri is a valid URI</div><div>of the http scheme.  Meanwhile,</div><div><br></div><div>  PackUriHelper.Create(baseUri,part)</div><div><br></div><div>exhibits interesting results, where part is the output of</div>
<div>the CreatePartUri method (the first code snipet).  Step 1</div><div>done by CreatePartUri is *undone* by the Create method.</div><div>That is, %5B and %5D are converted back to "[" and "]".</div><div>
<br></div><div>Here are my opinions.</div><div><br></div><div>- Is the behaviour of "[" and "]" (escaping by</div><div>  CreatePartUri and unescaping by Create) intentional?</div><div><br></div><div>- One could argue that the support of Steps 1, 2, 3, 4, 5,</div>
<div>  6 and 9 in CreatePartUri is merely for recovering from</div><div>  errors and that these steps are NOT for handling correct</div><div>  part names.  This is because PackUriHelper.Create</div><div>  cannot handle part names containing "errors" such as</div>
<div>  backslashes.</div><div><br></div><div>Regards,</div><div>Makoto</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-06-09 11:52 GMT+09:00 MURATA Makoto <span dir="ltr"><<a href="mailto:eb2m-mrt@asahi-net.or.jp" target="_blank">eb2m-mrt@asahi-net.or.jp</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I made two mistakes.<div><br></div><div>First, web requests based the pack scheme are supported.  </div>
<div>But this support is done by</div><div><br></div><div><span style="color:rgb(0,0,0);font-family:'Meiryo UI',Meiryo,'Segoe UI','Lucida Grande',Verdana,Arial,Helvetica,sans-serif;font-size:12.800000190734863px;line-height:14.039999008178711px">  System.IO.Packaging</span><span style="font-family:'Meiryo UI',Meiryo,'Segoe UI','Lucida Grande',Verdana,Arial,Helvetica,sans-serif;color:rgb(0,0,0);font-size:12.800000190734863px;line-height:14.039999008178711px">.</span><span style="color:rgb(0,0,0);font-family:'Meiryo UI',Meiryo,'Segoe UI','Lucida Grande',Verdana,Arial,Helvetica,sans-serif;font-size:12.800000190734863px;line-height:14.039999008178711px">PackWebRequest </span></div>

<div><span style="color:rgb(0,0,0);font-family:'Meiryo UI',Meiryo,'Segoe UI','Lucida Grande',Verdana,Arial,Helvetica,sans-serif;font-size:12.800000190734863px;line-height:14.039999008178711px"><br>

</span></div><div><span style="color:rgb(0,0,0);font-family:'Meiryo UI',Meiryo,'Segoe UI','Lucida Grande',Verdana,Arial,Helvetica,sans-serif;font-size:12.800000190734863px;line-height:14.039999008178711px">rather than</span><br>

</div><div><span style="color:rgb(0,0,0);font-family:'Meiryo UI',Meiryo,'Segoe UI','Lucida Grande',Verdana,Arial,Helvetica,sans-serif;font-size:12.800000190734863px;line-height:14.039999008178711px"><br>

</span></div><div><span style="color:rgb(0,0,0);font-family:'Meiryo UI',Meiryo,'Segoe UI','Lucida Grande',Verdana,Arial,Helvetica,sans-serif;font-size:12.800000190734863px;line-height:14.039999008178711px">  </span><font color="#000000" face="Meiryo UI, Meiryo, Segoe UI, Lucida Grande, Verdana, Arial, Helvetica, sans-serif"><span style="font-size:12.571428298950195px;line-height:14.039999008178711px">System.Net.WebRequest</span></font></div>

<div><font color="#000000" face="Meiryo UI, Meiryo, Segoe UI, Lucida Grande, Verdana, Arial, Helvetica, sans-serif"><span style="font-size:12.571428298950195px;line-height:14.039999008178711px"><br></span></font></div><div>

<font color="#000000" face="Meiryo UI, Meiryo, Segoe UI, Lucida Grande, Verdana, Arial, Helvetica, sans-serif"><span style="font-size:12.571428298950195px;line-height:14.039999008178711px">Second, PackUriHelper can generate URIs of the pack </span></font></div>

<div><font color="#000000" face="Meiryo UI, Meiryo, Segoe UI, Lucida Grande, Verdana, Arial, Helvetica, sans-serif"><span style="font-size:12.571428298950195px;line-height:14.039999008178711px">scheme.  For example,</span></font></div>

<div><br></div><div><font color="#000000" face="Meiryo UI, Meiryo, Segoe UI, Lucida Grande, Verdana, Arial, Helvetica, sans-serif"><span style="font-size:12.571428298950195px;line-height:14.039999008178711px"><div>  let baseUri = new Uri("<a href="http://www.example.com" target="_blank">http://www.example.com</a>", UriKind.Absolute)</div>

<div>  let part = new Uri ("/foo", UriKind.Relative)</div><div>  let packUri = PackUriHelper.Create(baseUri, part) </div><div><br></div><div>  System.Console.WriteLine("generated uri: {0}", packUri);;</div>

<div><br></div><div>returns </div><div><br></div><div><div>  generated uri: pack://http:,,<a href="http://www.example.com" target="_blank">www.example.com</a>,/foo</div><div><br></div><div>Regards,</div><div>Makoto</div>

<div><br></div><div><br></div></div></span></font></div><div><font color="#000000" face="Meiryo UI, Meiryo, Segoe UI, Lucida Grande, Verdana, Arial, Helvetica, sans-serif"><span style="font-size:12.571428298950195px;line-height:14.039999008178711px"><br>

</span></font></div><div><font color="#000000" face="Meiryo UI, Meiryo, Segoe UI, Lucida Grande, Verdana, Arial, Helvetica, sans-serif"><span style="font-size:12.571428298950195px;line-height:14.039999008178711px">Second, </span></font></div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-06-08 15:35 GMT+09:00 MURATA Makoto <span dir="ltr"><<a href="mailto:eb2m-mrt@asahi-net.or.jp" target="_blank">eb2m-mrt@asahi-net.or.jp</a>></span>:<div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Folks,<div><br></div><div>I did some more experiments.  My conclusion is <div>that .Net (with the possible exception of Web </div>

<div>Presentation Foundation) does not support the </div><div>pack scheme.</div>
<div><div><br></div><div>I thought that System.Uri of .Net can handle </div><div>the pack scheme.  But my experiment suggest </div><div>otherwise.  For example, </div><div><br></div><div>
 new Uri(@"pack://http%3a,,<a href="http://www.site.com" target="_blank">www.site.com</a>,windows,p1.xps/", UriKind.Absolute)<br></div><div><br></div><div>raises a UriFormatException.  I tried all examples shown </div>


<div>in 29500-2, but none of them parsed correctly.</div><div><br></div><div>I also tried </div><div><br></div><div>  WebRequest.Create (@"pack://http%3a,,<a href="http://www.site.com" target="_blank">www.site.com</a>,windows,p1.xps/");;<br>


</div><div><br></div><div>But I got an UriFormatException, again.</div><div><br></div><div>PackUriHelper supports the creation of part names, </div><div>which begin with "/".  But they do not appear to support </div>


<div>the creation of park URIs.</div><div><br></div><div>Regards,</div><div>Makoto</div><div><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-06-07 15:27 GMT+09:00 MURATA Makoto <span dir="ltr"><<a href="mailto:eb2m-mrt@asahi-net.or.jp" target="_blank">eb2m-mrt@asahi-net.or.jp</a>></span>:<div>

<div><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Folks<div><br></div><div>I did an experiment using F# of Visual Studio 2010 and</div><div>.Net framework 4.</div>


<div><br></div><div>For each bullet in the itemized list in A.3., I created an </div><div>example string.  Then, I executed</div>
<div><br></div><div>  PackUriHelper.CreatePartUri(new Uri(x, UriKind.Relative))<br></div><div><br></div><div>for each example string.  The source program and the </div><div>output is available at:</div><div><br></div><div>



<a href="https://www.assembla.com/spaces/IS29500/wiki/OPC_Annex_A3_Testing" target="_blank">https://www.assembla.com/spaces/IS29500/wiki/OPC_Annex_A3_Testing</a><br></div><div><br></div><div><br></div><div><div>It is not easy to interpret the result of this experiment.</div>



<div>One could argue that each input string is a part name.</div><div>One could also argue that each input string is merely </div><div>an erroneous input and that the resulting string is a </div><div>part name.  One could also argue that each string is </div>



</div><div>a Unicode string that can be converted to a part name.</div><div>We can discuss in Prague.</div><div><br></div><div>Regards,</div><div>Makoto</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">



2014-06-05 15:27 GMT+09:00 MURATA Makoto <span dir="ltr"><<a href="mailto:eb2m-mrt@asahi-net.or.jp" target="_blank">eb2m-mrt@asahi-net.or.jp</a>></span>:<div><div><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div dir="ltr"><br clear="all"><div><div>Folks,</div><div><br></div><div>I am not thiking about how examples (A.3) of resolution</div><div>of relative references in Annex A should be improved.</div><div><br></div><div>A.3 has caused a lot of confusions, since it does not distinguish two</div>




<div>cases: relatvies references beginning with "/" and those not beginning</div><div>with it.  The right approach is to clearly use resolution of relative</div><div>references as specified in RFC 3986 and demonstrate examples.  In</div>




<div>particular, we should show what the remove_dot_segments and merge</div><div>procedures in RFC 3986 do as part of this resolution.</div><div><br></div><div>A related problem is the absense of base URIs in A.3.  Obviously,</div>




<div>base URIs play key reoles in the resolution of relative </div><div>references.  Why are they not mentioned?  As a result, all examples </div><div>in A.3 appear to begin with "/".  There are no examplses that </div>




<div>do not begin with "/".</div><div><br></div><div>I am trying to reogranize examples thoroughly now.  I will </div><div>report back in a few days.</div><div><br></div><div>Regards,</div></div>Makoto
</div>
</blockquote></div></div></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><br>Praying for the victims of the Japan Tohoku earthquake<br><br>Makoto
</font></span></div>
</blockquote></div></div></div><div><div><br><br clear="all"><div><br></div>-- <br><br>Praying for the victims of the Japan Tohoku earthquake<br><br>Makoto
</div></div></div>
</blockquote></div></div></div><div><div class="h5"><br><br clear="all"><div><br></div>-- <br><br>Praying for the victims of the Japan Tohoku earthquake<br><br>Makoto
</div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><br>Praying for the victims of the Japan Tohoku earthquake<br><br>Makoto
</div>