xsl-list
[Top] [All Lists]

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

2014-04-29 13:56:56
Ted,

On Tue, Apr 29, 2014 at 10:50 AM, G. T. Stresen-Reuter
<tedmasterweb(_at_)gmail(_dot_)com> 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_^

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