[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Grouping By Column Heading (by Position, not by ID or element name)


Subject: Re: [xsl] Grouping By Column Heading (by Position, not by ID or element name)
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxx>
Date: Tue, 29 Apr 2014 14:56:40 -0400

Ted,

On Tue, Apr 29, 2014 at 10:50 AM, G. T. Stresen-Reuter
<tedmasterweb@xxxxxxxxx> wrote:
> 1) How is a TD element (found in the USE attribute of my Key) able to act as unique identifier for a TR element (it's parent)?

Actually it isn't, as you would find if you had two "Fruits" columns,
for example.

As you have it declared, the key is the (string) value of the tr/td[1]
element; it serves as a unique identifier iff that value is unique.

> 2) How should this be done (assuming mine is not optimal)?

This method is fine if you can control your columns so that their top
cell's values are always unique.

It's not even a bad way to go if limited to 1.0 logic.

In 2.0 I would probably just group on the position of the items.

> Please note that I realize this does not require using keys (I don't think) but I like using keys because it makes sense semantically.

Indeed it does -- even in the sense that it holds up only as long as
your semantics do. :-)

Cheers, Wendell

-- 
Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables
_____oo_________o_o___ooooo____ooooooo_^


Current Thread
Keywords