On Nov 27, 2009, at 20:55 , Marcos Caceres wrote:
> On Thu, Nov 26, 2009 at 2:40 PM, Cyril Concolato
> <[email protected]> wrote:
>> I'm trying to implement the element-based localization and I found the spec
>> unclear with regards to the inheritance of th xml:lang attribute and I would
>> like to propose some improved text.
>> First, this attribute is listed as an optional attribute of the widget
>> element but the widget element is not localizable, so one does not
>> understand why.
> 
> D'oh! that should be a "localizable: yes". Thankfully, that's there
> for author clarification.

Really? I wouldn't have thought so. There's a difference between "you can have 
xml:lang there" and "it is meaningful to have xml:lang there (or on its 
ancestors)". You can have xml:lang on widget, but the widget element cannot 
really be localised (you can't have two, choosing between them depending on 
locale). It's not a huge difference, but putting "localisable: yes" on widget 
would confuse me.

> I've added this to the editor's draft:
> 
> "As part of their definition, the XML elements of the configuration
> document are marked as being localizable via xml:lang with either the
> word "yes" or "no". An author can use the xml:lang attribute on any
> XML element, including any element in the widget namespace. During
> Step 7, the user agent will apply the standardized behavior of
> xml:lang specified in the [XML] specification (i.e. inheritance and
> propagation of the xml:lang attribute will occur on child elements on
> which it was not explicitly used - see example below to see how this
> inheritance and propagation works). Regardless of whether xml:lang was
> inherited or explicitly used in an element, a user agent will only use
> the value of an xml:lang attributes for the purpose of element-based
> localization in Step 7 when that element was explicitly marked with
> the text "Localizable via xml:lang: Yes" as part of that elements
> definition."
> 
> WDYT?

I think that this is even more confused than the original :) To clarify, I 
think you need to make the same distinction I made above re "can have xml:lang" 
and "supports being localised". Otherwise you get sentences like "elements of 
the configuration document are marked as being localizable via xml:lang with 
either the word "yes" or "no". An author can use the xml:lang attribute on any 
XML element", to which I can only reply "ebbeh?".

How about:

"""
The xml:lang attribute can be used on any element in order to indicate which 
language is used in the content and attribute values of that element. Its value 
is inherited, such that if an element has an xml:lang attribute, all of its 
descendants are considered to be in that language as well, unless they specify 
their own xml:lang attribute. Note that an element can indicate that it is in 
no specific language by setting xml:lang to the empty string, irrespective of 
whether any of its ancestors has an xml:lang attribute.

Some of the elements in the widgets namespace are defined to be localisable. 
This means that they will be processed in a specific manner if they have an 
xml:lang value (directly or through inheritance), as described in detail in 
Step 7.
"""

WDYT?

-- 
Robin Berjon - http://berjon.com/




Reply via email to