Subject: Re: PaceLang

From: Eric Scheid <[email-masked]>
Date: Thu, 15 Jul 2004 00:47:45 +1000

> Add support for the xml:lang special attribute to all the relevant Atom
> elements. From the current draft, it seems enough to specify xml:lang on the
> Content Construct

what about @title in <link> constructs?

e.

(assuming they'll remain)

---

From: Antone Roundy <[email-masked]>
Date: Wed, 14 Jul 2004 09:09:33 -0600

> what about @title in <link> constructs?

That brings up an argument in favor of <link ...>put the title 
here</link> (or <linkConstructOfSomeOtherName ...>title 
here</linkConstructOfSomeOtherName>.  With that arrangement, it would 
be perfectly clear that xml:lang applies to the title.

---

From: Mark Pilgrim <[email-masked]>
Date: Wed, 14 Jul 2004 12:59:19 -0400

> be perfectly clear that xml:lang applies to the title.

No it doesn't.  The XML specification is already crystal clear on this:

http://www.w3.org/TR/REC-xml/#sec-lang-tag

"xml:lang is considered to apply to all attributes and content of the
element where it is specified"

There may be other arguments in favor of changing the link syntax, but
this isn't one of them.

-- 
Cheers,
-Mark

---

From: Asbjørn Ulsberg <[email-masked]>
Date: Wed, 14 Jul 2004 22:50:19 +0200

> element where it is specified"

Does 'xml:lang' also apply to attribute _values_? Either way, wouldn't it  
be wierd to have 'xml:lang="nb-NO"' on a <content> element along with  
@type and @mode which have both english names and values? Take the  
following example:

   <content type="application/xhtml+xml" mode="xml" xml:lang="nb-NO">
     <div xmlns="http://www.w3.org/1999/xhtml">
       <h1>Hei på deg</h1>
     </div>
   </content>

If 'xml:lang' is supposed to apply to both aton:content/@type,  
atom:content/@mode and atom:content/xhtml:div, how is that supposed to  
work, exactly? I find it very wierd that 'xml:lang' not only applies to  
children (and their attributes) of the element it is specified on, but it  
seems that no matter what you do, you'd get into trouble with this  
description of the attribute.

> There may be other arguments in favor of changing the link syntax, but

I think it is, but that doesn't matter much. I can live with @title, I  
just find 'xml:lang' awkward, that's all.

-- 
Asbjørn Ulsberg         -=|=-        [email-masked]
«He's a loathsome offensive brute, yet I can't look away»

---

From: Tim Bray <[email-masked]>
Date: Wed, 14 Jul 2004 14:19:15 -0700

On Jul 14, 2004, at 1:50 PM, Asbjørn Ulsberg wrote:

> Does 'xml:lang' also apply to attribute _values_? Either way, wouldn't 
> it be wierd to have 'xml:lang="nb-NO"' on a <content> element along 
> with @type and @mode which have both english names and values? Take 
> the following example:
>

xml:lang applies on those contacts where the content is interpreted as 
being in human language, not protocol keywords.  In this case, only to 
the content of <h1> -Tim

---

From: Mark Pilgrim <[email-masked]>
Date: Wed, 14 Jul 2004 17:34:42 -0400

>    <content type="application/xhtml+xml" mode="xml" xml:lang="nb-NO">

@type and @rel are enumerations.  They have a predefined set of
values; they are not free-form text in any human language.

> just find 'xml:lang' awkward, that's all.

We are using it exactly as it is specified in the XML specification,
and I see no compelling reason to do otherwise.

However, this does bring up the point that xml:lang is not just
specific to Content constructs, and therefore this Pace is invalid.

* <atom:link> can also have xml:lang, which applies to the @title attribute.
* <atom:author> (or <atom:name> within author) can have xml:lang,
which applies to the author's name.
* Ditto <atom:contributor> (unless we've dropped that by now)
* <atom:generator> can have xml:lang which applies to the toolkit name.

-- 
Cheers,
-Mark

---

From: Sam Ruby <[email-masked]>
Date: Wed, 14 Jul 2004 18:22:42 -0400

> specific to Content constructs, and therefore this Pace is invalid.

I don't follow.  Why can't we define validity constraints which 
constrain which elements an xml:lang attribute may, or may not, be placed?

- Sam Ruby

---

From: Mark Pilgrim <[email-masked]>
Date: Wed, 14 Jul 2004 19:45:38 -0400

> constrain which elements an xml:lang attribute may, or may not, be placed?

I was under the impression that the current draft allowed xml:lang
anywhere, and this Pace was restricting it to Content constructs.  My
point is that there are several other places in feeds where xml:lang
would be useful.

I think we should withdraw PaceLang and keep the language currently in the spec.

-- 
Cheers,
-Mark

---

From: Tim Bray <[email-masked]>
Date: Wed, 14 Jul 2004 17:09:52 -0700

> I think we should withdraw PaceLang and keep the language currently in 

+1  -Tim

---

From: Eric Scheid <[email-masked]>
Date: Thu, 15 Jul 2004 10:23:36 +1000

> point is that there are several other places in feeds where xml:lang

the problem was someone pointed out that you can only *put* xml:lang in
those places which are specified as allowing xml:lang (with the other places
still being affected, but only by an ancestor xml:lang)

I don't remember if this was an xml:lang spec issue or if it was a
tools/schema issue.

if indeed the xml:lang spec says "you can only *put* this where explicitly
allowed", then we need to do more than what is in the spec now... ie.
enumerate the elements which are allowed to specify @xml:lang

e.

---

From: Asbjørn Ulsberg <[email-masked]>
Date: Thu, 15 Jul 2004 08:13:23 +0200

> I don't remember if this was an xml:lang spec issue or if it was a

IIRC, it was a schema-issue. However, the current specification text does  
not state clearly enough (or at all) that 'xml:lang' also affects the  
attributes of the element it is placed on, and I find it strange that the  
text in the Atom spec is not just a copy + paste from the XML spec. This  
is the current language of the specification:

    Any element in an Atom document MAY have an xml:lang attribute, whose
    content indicates the default natural language of the element's
    content.  The content of this attribute MUST be a language tag
    [RFC3066].  When determining element content's natural language, the
    first xml:lang attribute encountered in that element's ancestors MUST
    be used.

We should somehow append the text «xml:lang is considered to apply to all  
attributes and content of the element where it is specified» to that  
paragraph, so attributes are explicitly named as well. I think it also  
should be mentioned throughout the specification which attributes are  
affected by 'xml:lang' and which aren't.

Is there a way in XSD to handle this elegantly? Can one e.g. say which  
attributes are and aren't a part of the human readable content and not,  
and thus which attributes (and elements) that are affected and not by  
'xml:lang'?

---

From: Martin Duerst <[email-masked]>
Date: Fri, 16 Jul 2004 17:41:22 +0900

>>I think we should withdraw PaceLang and keep the language currently in 

I'd be okay with this, but the pace also tweaks the text about what
exactly can be a value of xml:lang.

The current spec text says:
"The content of this attribute element MUST be a registered language
tag [RFC3066]."

The proposed text for this says:
"When present, this attribute MUST be a registered language tag from RFC3066
or its successors; in addition, an empty string (xml:lang="") MAY be
specified to indicate that there is no language information available."

The later is clearly more in line with XML (3rd edition), and more
futureproof, and therefore should be used even if the rest is kept
as is.

Regards,    Martin.

---

From: Martin Duerst <[email-masked]>
Date: Fri, 16 Jul 2004 17:43:54 +0900

>still being affected, but only by an ancestor xml:lang)

Both the current wording and the new wording proposed by the pace
do this. If the Atom spec says (as it currently does)
"Any element MAY have an xml:lang attribute ...", then this
is completely sufficient, and any DTD/Schema designer will
hopefully know what to do with it (namely declare xml:lang
on all elements).

Regards,     Martin.