This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: <sort lang="sv"/> in Saxon


Hi Jeni,
thanks for the explanations! If your book is full of this kind
of stuff, and no doubt it is, it's a *must have*!

However, maybe i'm feeling overly nitpicky today...
> The XSLT Rec specifically states:
>   lang specifies the language of the sort keys; it has the same range
>   of values as xml:lang [XML]; if no lang value is specified, the
>   language should be determined from the system environment
> So the local collating sequence should be used if no lang attribute is
> specified.

Actually, it is not explicitely mentioned that the language determines
the collating sequence. Furthermore, the concept of "local collating
sequence" is, without a reference to a defining standard, ill defined.
After all, what's "local": The machine default setting, if such a thing
even exists, a user dependent environment, an environment setup
specifically for a certain transformation run?
I'd rather like to have the wording "The processor should document
how it obtains a language in absence of an explicit specified value."
or something like that. At least it's not as fuzzy as "get it from the
environment".

> The fact is that sorting according to different languages isn't
> straight-forward.
Oh well!
Just another note: practically every reasonable built up environment
knows how to sort according to the POSIX LANG=C locale. But there is
no standardized way to tell a processor to use it (unless i missed
the IANA code for it). Except by default, of course. Hmm.

> ... it's a
> massive burden to expect every processor to support *every* language.
Yes, it's a pity that despite all the work already done most
environments are still lacking many important capabilities.

> > ...rationale for inventing the xsl:lang attribute
> *Probably* it's to do with the fact that xml:lang is designed to
> indicate the language used by the element content/attribute values on
> an element. xsl:sort doesn't have any content;
Great explanation, i thought "if there is no content, why does the
distinction matter?" but i missed the attributes!

> if you used xml:lang it would be to do things like:
[heretic example snipped]
Is there a way to unwrite this? Or at least to embargo it for french
users :-), for fear someone thinks it's actually a good idea to have
keywords to be localized (see the extensive but totally pointless
discussion in XSchema whether for example floating point numbers
should be accepted in their localized form).

> (xsl:)lang, on the other hand, is indicating the language of the sort
> values, which is a uniquely XSLT concept.
Agreed. But then, as we are already running a big schema impact
discussion, how does this kind of language specification relate to
schema specified datatypes?

Regards
J.Pietschmann

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]