[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmppwg] Re: Last Call: 'XMPP Core' to Proposed Standard
Comments and proposed text at end.
On Sat, Sep 27, 2003 at 09:39:41AM -0700, Pete Resnick wrote:
> On 9/26/03 at 12:24 PM -0500, Peter Saint-Andre wrote:
>
> > Therefore I propose that the following text be added to
> > Section 4.2 (Stream Attributes) of this memo:
> >
> > o xml:lang -- An 'xml:lang' attribute (as defined in
> > Section 2.12 of the XML specification [1]) SHOULD be
> > included to specify the default language of any XML
> > character data sent over the stream. The language
> > specified for the stream MAY be overridden by the
> > 'xml:lang' attribute of a specific XML stanza or a
> > child element thereof (see xml:lang (Section 8.1.5)).
> > The value of the attribute MUST be an NMTOKEN and
> > MUST conform to the format defined in RFC 3066 [15].
> > If no 'xml:lang' value is provided for the stream,
> > an implementation MUST assume that the language is
> > "en-US".
>
> I had a conversation with Ted and now I see what his concern is. Let
> me explain what I think should be done. There are two parts:
>
> 1. The last sentence of the above is simply wrong. The idea that
> there should be an "English default" was introduced when we were
> talking about 'xml:lang' as some sort of locale request, and we came
> to consensus that we didn't want that. The only thing 'xml:lang' is
> telling you is the language of the contained text. Given that, we
> don't want to say that it defaults to English: What would it mean to
> say that some Unihan character should be interpreted as English? So,
> strike the last sentence.
>
> 2. Ted is concerned that since the XML spec says that the 'xml:lang'
> applies to *all* attribute values, implementors of future protocols
> based on XMPP (i.e., something other than IM) need to be warned that
> even though 'xml:lang' is on the entire stream, it only applies to
> text intended for human consumption. (His fear is that someone might
> do some goofy language dependent processing on an attribute value
> that is clearly not human readable text.) I think this can simply be
> addressed by changing "to specify the default language of any XML
> character data sent over the stream" to "to specify the default
> language of any human-readable XML character data sent over the
> stream". Ted may want to further comment on this.
That makes sense. Does the following text address the concern and
capture the consensus from last October?
4.2 Stream Attributes
...
o xml:lang -- An 'xml:lang' attribute (as defined in Section
2.12 of the XML specification [1]) SHOULD be included by the
initiating entity on the header for the initial stream to specify
the default language of any human-readable XML character data it
sends over that stream. If included, the receiving entity SHOULD
remember that value as the default for both the initial stream
and the response stream; if not included, the receiving entity
SHOULD use a configurable default value for both streams, which
it MUST communicate in the header for the response stream. For
all stanzas sent over the initial stream, if the initiating entity
does not include an 'xml:lang' attribute, the receiving entity
SHOULD apply the default value; if the initiating entity does
include an 'xml:lang' attribute, the receiving entity MUST NOT
modify or delete it (see also xml:lang (Section 8.1.5)). The
value of the 'xml:lang' attribute MUST be an NMTOKEN and MUST
conform to the format defined in RFC 3066 [15].
...
8.1.5 xml:lang
A stanza SHOULD possess an 'xml:lang' attribute (as defined in
Section 2.12 of the XML specification [1]) if the stanza contains
XML character data that is intended to be presented to a human
user (as explained in RFC 2277 [14], "internationalization is for
humans"). The value of the 'xml:lang' attribute specifies the
default language of any such human-readable XML character data,
which MAY be overridden by the 'xml:lang' attribute of a specific
child element. If a stanza does not possess an 'xml:lang' attribute,
an implementation MUST assume that the default language is that
specified for the stream as defined under Stream Attributes
(Section 4.2) above. The value of the 'xml:lang' attribute MUST be
an NMTOKEN and MUST conform to the format defined in RFC 3066 [15].