RE: [XSLT2.0] lang attribute on xsl:number and xsl:sort

>I'm reluctant to fall out of line with the XML specification here.

I don?t think that the XML specification would make suggested mapping
illegal. I am suggesting to use the second subtag for variant.
Such usage is recommended by
http://www.openi18n.org/specs/ldml/1.0/ldml-spec.htm

I think that unumbigous mapping of a variant would be useful for
users.
Changes in behavior caused by the variant are ,of course?
implementation defined, but I would expect that Java JDK or ICU
users would have the same unambiguous results.


Igor Hersht
XSLT Development
IBM Canada Ltd., 8200 Warden Avenue, Markham, Ontario L6G 1C7
Office D2-260, Phone (905)413-3240 ; FAX  (905)413-4839


                                                                                                     
                      "Kay, Michael"                                                                 
                      <Michael.Kay@soft        To:       Igor Hersht/Toronto/IBM@IBMCA,              
                      wareag.com>               <public-qt-comments@w3.org>                          
                                               cc:                                                   
                      01/13/2004 02:49         Subject:  RE: [XSLT2.0] lang attribute on xsl:number  
                      PM                        and xsl:sort                                         
                                                                                                     
                                                                                                     
                                                                                                     



> SUGGESTION 2:
>
> lang attribute used in xsl:number(12 Numbering)
> and xsl:sort (13.1 The xsl:sort Element) language argument
> used in date formatting functions (16.5 Formatting Dates and
> Times) format-dateTime, format-date, format-time The
> attribute and arguments have common rules "The effective
> value of the attribute must be a value that would be valid
> for the xml:lang attribute"
> (http://www.w3.org/TR/1998/REC-xml-19980210#sec-lang-tag).
> The specs define precisely mapping from value of the
> attribute to ISO 639 language and ISO 3166 country codes.
>
> Problem Mapping from a value of the attribute to a variant
> code is not specified.
>
>  Solution
> A variant code should be constructed from the substring after
> the second tag separator by converting the substring to upper
> case and replacing all '-' characters with '_'. The variant
> code is ignored, if implementation cannot find a resources
> for the variant code with given ISO-639 language and ISO-3166
> country code. A warning message should be issued in this
> case. Changes in behavior caused by the variant are
> implementation defined.
>

Personal response:

I may have misunderstood the intent behind the specification of
xml:lang, but my reading of it is that subcodes after the first can be
anything you like, so long as it is alphabetic: for example, they can be
used for variants.

I'm reluctant to fall out of line with the XML specification here.

I'm also rather dubious of having too many of these mechanisms where we
specify the syntax but say nothing about the semantics. Does it really
improve interoperability?

Michael Kay

Received on Wednesday, 14 January 2004 17:09:04 UTC