At 2004-03-02 12:38 -0800, James A. Robinson wrote:
That's amazing. Thank you very much for the solution. I think I understand
what is going on, but my grasp of non-procedural languages is minimal
at best.
You're example shows that one can iterate over the unique
element+attribute combinations by excluding any element+attribute which
is not the first instance of the given attribute, right?
Close ... I'm not "excluding any e+a which is not the first" ... I'm using
the first of any given e+a combination as the signal to do *all* of the
given e+a combination. The <xsl:if> is a trigger of when to do the work,
and then I just do the work once with the given criteria. Any subsequent
time I do nothing because I assume that I did the work the first time around.
The essence of grouping in XSLT 1.0 is to find a test that is only true
once, and then do all the work when that test is true and ignore the work
when the test is false. That is the premise of each of axis-based,
variable-based and key-based grouping.
I hope this helps.
...................... Ken
--
US XSL training: Washington,DC March 15; San Francisco,CA March 22
World-wide on-site corporate, government & user group XML training
G. Ken Holman mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list