Re: [xsl] re: SPAM-HIGH: Re: [xsl] Order of items in current-group()

Subject: Re: [xsl] re: SPAM-HIGH: Re: [xsl] Order of items in current-group()
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Wed, 24 Feb 2010 12:42:22 -0800
On Wed, Feb 24, 2010 at 11:59 AM, Vladimir Nesterovsky
<vladimir@xxxxxxxxxxxxxxxxxxxx> wrote:
>> As the original question is not yet answered, the order is specified
> here:
> I see no statements as of order of items in a group.
> Would you quote required statement please?

See this:

"ERR XTTE1120] When the group-starting-with or group-ending-with
attribute is used, it is a type error if the result of evaluating the
select expression contains an item that is not a node.

b"If the group-by attribute is present, the items in the population are
examined, in population order. For each item J, the expression in the
group-by attribute is evaluated to produce a sequence of zero or more
grouping key values. For each one of these grouping keys, if there is
already a group created to hold items having that grouping key value,
J is added to that group; otherwise a new group is created for items
with that grouping key value, and J becomes its first member.

An item in the population may thus be assigned to zero, one, or many
groups. An item will never be assigned more than once to the same
group; if two or more grouping keys for the same item are equal, then
the duplicates are ignored. An item here means the item at a
particular position within the populationbif the population contains
the same node at several different positions in the sequence then a
group may indeed contain duplicate nodes.

The number of groups will be the same as the number of distinct
grouping key values present in the population."

As Dr. Kay noted, they failed to clarify that "J is added to that
group" actually means: J is added *at the end* of the sequence for
that group.

Dimitre Novatchev
Truly great madness cannot be achieved without significant intelligence.
To invent, you need a good imagination and a pile of junk
Never fight an inanimate object
You've achieved success in your field when you don't know whether what
you're doing is work or play
I enjoy the massacre of ads. This sentence will slaughter ads without
a messy bloodbath.

Current Thread