This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
RE: Sorting and non-en_US indexes
- From: David Cramer <dcramer at broadjump dot com>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Wed, 25 Sep 2002 17:10:32 -0500
- Subject: RE: DOCBOOK-APPS: Sorting and non-en_US indexes
When I said 'the spec isn't clear' I actually meant 'the spec isn't
clear to me" (because I'm not so good at reading that bnf-ish notation).
Looking again tho, I see this sentence: "...all of these attributes are
interpreted as attribute value templates" (where 'these' has to include
lang--see full text below).
http://www.zvon.org/xxl/XSLTreference/W3C/xslt.html#sorting:
...The following optional attributes on xsl:sort control how the list of
sort keys are sorted; the values of all of these attributes are
interpreted as attribute value templates.
* order specifies whether the strings should be sorted in ascending or
descending order;...
* 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
* data-type specifies the data type of the strings; the following values
are allowed...
* case-order has the value upper-first or lower-first; this applies when
data-type="text"...
So I think lang on xsl:sort can be an AVT.
David
> -----Original Message-----
> From: Jirka Kosek [mailto:jirka@kosek.cz]
> Sent: Wednesday, September 25, 2002 3:48 PM
> To: David Cramer
> Cc: docbook-apps@lists.oasis-open.org
> Subject: Re: DOCBOOK-APPS: Sorting and non-en_US indexes
>
>
> David Cramer wrote:
> >
> > Actually, I think AVTs are ok in lang on xsl:sort even in
> 1.0. The text
> > of the spec isn't clear, but if the 'non-normative dtd' can
> be trusted,
> > avts are ok:
> > http://www.zvon.org/xxl/XSLTreference/W3C/xslt.html#dtd
> >
> > <!ELEMENT xsl:sort EMPTY>
> > <!ATTLIST xsl:sort
> > select %expr; "."
> > lang %avt; #IMPLIED
> > ^^^^^
> > data-type %avt; "text"
> > order %avt; "ascending"
> > case-order %avt; #IMPLIED
> > >
>
> But XSLT 1.0 is clear in this issue, I think. See section 10:
>
> <xsl:sort
> select = string-expression
> lang = { nmtoken }
> data-type = { "text" | "number" | qname-but-not-ncname }
> order = { "ascending" | "descending" }
> case-order = { "upper-first" | "lower-first" } />