xsl-list
[Top] [All Lists]

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

2010-02-24 14:43:04
On Wed, Feb 24, 2010 at 11:59 AM, Vladimir Nesterovsky
<vladimir(_at_)nesterovsky-bros(_dot_)com> wrote:
As the original question is not yet answered, the order is specified
here:

http://www.w3.org/TR/2007/REC-xslt20-20070123/#element-for-each-group

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.

•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 population—if 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.

-- 
Cheers,
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.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>