[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: re: SPAM-HIGH: Re: Order of items in curren

Subject: Re: re: SPAM-HIGH: Re: Order of items in current-group()
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Wed, 24 Feb 2010 12:42:22 -0800
Re:  re: SPAM-HIGH: Re:  Order of items in  curren
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:
>>
>> 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.

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.

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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.