Re: [widgets] Comments on Widgets 1.0: Packaging and configuration, 9.1 Processing rules

Hi Francois,

A brief response to your question below...

For the Disposition of Comments, can you please respond to this email
and indicate if you are satisfied with the WG's responses?


On Thu, Jul 2, 2009 at 5:46 PM, Francois Daoust<fd@w3.org> wrote:
>>> Comment 3: localization and absolute URIs
>>> -----
>>> We more or less already exchanged emails on that, but... I don't
>>> understand
>>> the need to have absolute paths bypass localization.
>>
>> I guess the logic is that authors, for whatever reason (e.g., force
>> testing a locale without needing to change the locale on their
>> device), are going to use absolute URIs, so I'm of the opinion that we
>> support them.
>
> Right but they don't seem to be supported by the widget scheme document. See
> example below.
>
>
>>
>>> Consider the two examples below:
>>>  1. a config document that contains a <content
>>> src="startfolder/index.html"
>>> /> directive
>>>  2. a config document that contains a <content
>>> src="/startfolder/index.html"
>>> /> directive
>>>
>>> I think people are used to using relative and absolute paths in links
>>> interchangeably. Since the config document is at the root of the widget,
>>> I
>>> would expect the two examples to have the same effect.
>>
>> Yes, they would have the same effect iff the folder structure was:
>>
>> widget.wgt
>>  /startfolder/
>>
>> But, for whatever reason, the folder structure was as follows, it
>> would also work:
>>
>> widget.wgt
>>  startfolder/index.html
>>  fr/startfolder/index.html
>>  jp/startfolder/index.html
>>
>>> Here, if the widget's
>>> package contains a locales/fr/index.html, it may be used in the first
>>> case
>>> (provided "fr" is in user agent locales of course), but it won't ever be
>>> used in the second case.
>>
>> Yes, for case 1, so long as:
>>
>> widget.wgt
>>  fr/startfolder/index.html
>>
>> And yes, it will not be matched in case 2... which is what I would expect.
>>
>>> I realize that when an absolute path is treated the same way as a
>>> relative
>>> path, the "Complex example" of 8.4 Localization Examples:
>>> http://dev.w3.org/2006/waf/widgets/#complex-example
>>> ... cannot be implemented as such in practice. I think that's fine, there
>>> should not be any way for something in a "locales/[LANG]" folder (or
>>> wherever else for that matter) to bypass the localization algorithm.
>>> Having
>>> one complicates things more than anything else, IMHO.
>>
>> I personally don't agree (I personally like the way it works right now
>> and seem consistent with the way I would expect absolute paths to
>> work). However, I think I will defer this to the working group for a
>> resolution; others may agree with your position or I might not be
>> understanding your proposal.
>
> I'd say you understood what I meant ;)
> Note I do not object to the group's final resolution on this, whatever it
> may be.
>
> Let me just try another example that mixes this document and the widget
> scheme doc to clarify what I find slightly inconsistent.
>
> Consider the following widget package, and a user agent that has "fr" in its
> locales:
> widget.wgt
>  config.xml
>  start.html
>  about.html
>  locales
>    fr
>      start.html
>      about.html
>
> config.xml points to start.html as the widget start file through a <content
> src="/start.html" /> element. The mapping between the path and the widget
> resource is defined in the Packaging spec.
> start.html links to about.html through a <a href="/about.html">About this
> widget</a> link. The mapping between the path and the widget resource is
> defined in the widget scheme spec.
>
> Both links use absolute paths. Visually, they look alike.
>
> Per the rule for finding a file within a widget package [1] defined in the
> packaging spec, the start file is resolved in step 3, and matches
> "widget.wgt/start.html". No localization because it is an absolute path.
> Per the Mapping widget URIs to Widget Resources [2] section in the widget
> scheme spec, the starting "/" gets removed before applying the rule for
> finding a file within a widget package [1], so "about.html" enters the rule
> steps, localization occurs, and "widget.wgt/locales/fr/about.html" gets
> matched.

This is a bug in the URI spec. Absolute path is an absolute path, IMO.
I will ask Robin, who is editing the URI spec, to fix this.

> From a user perspective, why should there be a difference between the way
> links in the config file and links in other files are mapped to widget
> resources?
>

I agree. This should be consistent: the URI spec needs to follow the P&C spec.

Kind regards,
Marcos

-- 
Marcos Caceres
http://datadriven.com.au

Received on Monday, 6 July 2009 13:34:50 UTC