Re: [widgets] Base folder and resolution of relative paths

Hi Francois,
Sorry for taking soooo long to get back to you. I started addressing
your feedback but then your comments kinda spun out of control and
became a new document:

http://dev.w3.org/2006/waf/widgets/i18n.html

I'm hopeful you will find the time to give your two cents about the
proposed solution to i18n.

Kind regards,
Marcos


On Thu, Jan 29, 2009 at 3:21 PM, Francois Daoust <fd@w3.org> wrote:
>
> Hi,
>
> Here are a few comments on the 28 January 2009 version of the Widgets 1.0:
> Packaging and Configuration located in:
>  http://dev.w3.org/2006/waf/widgets/
>
> They are mostly triggered by the Content Localization section and the
> associated mechanisms to search for files. The following comments may well
> be garbage, that wouldn't be the first time I miss something ;-)
>
>
> The base folder
> -----
> 1. I wonder if there isn't a problem in the processing mechanism described.
>
> Let's take part of the example in 6.5, and say my locale is "en":
> /
>  config.xml
>  ... that contains a <content src="cats.html" /> in, say, Korean.
>  cats.xml
>  Locales/
>   en/
>     cats.html
>
> Per Step 6, the base folder will be "/Locales/en".
> Per Step 7, the Configuration Document is /config.xml because there is no
> config.xml in /Locales/en
> Per Step 8, the "content" element part, the widget start file is the target
> of the "src" attribute. The value is "cats.html".
> Per Step 9, the widget start file is set. I'm done.
>
> I do not see anything here that makes me use the base folder. So final
> widget start file is "/cats.xml".
> I would expect the start file to be /Locales/en/cats.html in that case. Did
> I miss something?
>
>
> 2. In 6.5, a note says:
>  "At runtime, the widget user agent will set the (HTML or XML) base of the
> *start file* to the localized folder".
> Based on the above comment, shouldn't that rather be:
>  "At runtime, the widget user agent will set the (HTML or XML) base of the
> *Configuration file* to the localized folder".
>
> In any case, this note should appear either in Step 8 to tell processors to
> change the base of the configuration file to the base folder, or at the end
> of Step 9 to remind processors that they need to change the base when
> parsing the start file.
>
>
> 3. I find the definition of *base folder* slightly confusing:
>  http://dev.w3.org/2006/waf/widgets/#base-folder
>  "The base folder is the folder from which all relative paths are resolved."
>
> From what I understand the base folder has two uses:
>  a. to effectively change the base of the [configuration/start] (depending
> on what you decide for 2.) file when it is processed, in which case it is
> indeed used to resolve relative paths, though only in one file
>  b. to search for localized default files, in which case it is not really
> used to resolve any relative path.
>
> The definition makes it look as though the processor needs to change the
> HTML or XML base in all the files it processes.
> I confess I do not have any better definition in mind.
>
> My whole point is more that the resolution of relative paths looks confusing
> and could be clarified. I do not think it requires any substantive change to
> the specification.
>
>
>
> The Localized Widget Example
> -----
> Section 6.5 Content Localization
>  http://dev.w3.org/2006/waf/widgets/#content-localization
>
> I see that the example was updated from the Last Call version in response to
> a comment. As it stands, I'm having problems linking the "relevant things to
> note" with the example in itself:
>
> 1. First bullet point is "The config.xml file at the root configures English
> (en/, en-gb/) and Korean versions of the widget":
>  - I see the mention to the Korean language in the root config.xml file, but
> why does it configure English?
>  - there is an "en-au" subfolder in locales, but no "en-gb".
>
> 2. Second bullet reads "All localized instances rely on the same
> un-localized script (engine.js)". If that's the case:
>  - The value of the src attribute in /locales/en-au/cats.html should start
> with a "/":
>  <script src="/scripts/engine.js">
>  (that was the case in the published Last Call)
>  - the locales/en-au/scripts/engine.js is confusing at best, and should be
> removed
>  Alternatively, the bullet could read "The English-Australia version uses a
> localized script (engine.js). The Spanish version uses the un-localized
> script in /scripts/engine.js.
>
>
>
> Minor typos
> -----
> - 3.2 Internationalized Tag Set Support
>  http://dev.w3.org/2006/waf/widgets/#internationalized-tag-set-support
>  "to support *of* other" -> "to support other"?
>
> - 6.2 Files and Content Types
>  http://dev.w3.org/2006/waf/widgets/#base-folder6.2
>  "For sniffng the content type" -> "For sniffing the content type"
>
> - 6.2 Files and Content Types
>  http://dev.w3.org/2006/waf/widgets/#base-folder6.2
>  "defuault functionality" -> "default functionality"
>
> - In Step 3 - Set the Configuration Defaults:
>  http://dev.w3.org/2006/waf/widgets/#step-3-set-the-configuration-defaults
>  In the Configuration Defaults table, the base folder description links back
> to the line. Correct anchor should be "base-folder", not "base-folder-0"
>
>
> Thanks,
> Francois Daoust.
>
>



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

Received on Monday, 20 April 2009 12:44:19 UTC