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]
Other format: [Raw text]

Re: Hierarchical grouping question


Hi Charles,

> I'm working on a hierarchical grouping stylesheet, basing my efforts
> on Jeni Tennison's "XSLT and XPath on the Edge", Chapter 9. My data
> set doesn't have any attributes on which to base grouping, rather I
> will base the grouping on the value of a child element (ROW/PERIOD).
> My first problem is with this element:
>
> <xsl:variable name="unique-rows" select="..." />
>
> Can anyone explain what the three periods represent? I understand
> that a single period represents the context element, and a double
> period represents the context element's parent, and in non-XPath
> ordinary usage, three periods are an elipsis, representing a
> continuation of material which is left out. I can't find any meaning
> for the three periods in this expression, and I've looked over and
> over at the text's example and those three are definitely there.

It's being used in the "non-XPath ordinary usage" -- an elipsis. The
bit of the chapter that you're looking at is describing the general
"hierarchical" grouping method. What you put in the select attribute
depends on the kind of grouping that you need to do (e.g. grouping by
position or grouping by a particular value).

If you go on into the next sections of the chapter, you'll see fuller
examples showing grouping in those different ways. Since you're
grouping by value, have a look at the "Grouping by Value" section, and
in particular "Grouping Unsorted Records by Value" on pages 216 to
221. That shows you how to complete the select attribute.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 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]