Subject: Re: [xsl] Calculating groups of repeating elements|
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Dec 2008 08:41:25 -0500
Thanks for looking at this! Sorry for not being as clear as I could've been with what I'm looking for. For the example data set, I'm trying to automatically generate an output something like this:
Aa + C + Qqq: 2 places (1, 3) Aa + C: 3 places (1, 2, 3) Aa + Zz: 2 places (2, 3) C + Qqq: 2 places (1, 3)
So it lists all the groups of 2+ words that appear together in 2+ places. This list is sorted by length of the group (3 words is the maximum number of words that occurs in 2+ places in the sample data), but it'd be nice to also be able to sort by number of places:
Aa + C: 3 places (1, 2, 3) Aa + Zz: 2 places (2, 3) etc.
I was using intersects to get places with Aa AND C AND Qqq (<xsl:value-of select="count(atlas/place/place_number[../words/word='Aa'] intersect atlas/place/place_number[../words/word='C'])"/>), but got overwhelmed by the number of ways I'd have to plug in all the different words to go through the data exhaustively-- the real data has 250+ places and 75+ words.
returns those tree nodes in node set $a that are the same tree nodes found in node set $b ... not by value, but the nodes themselves.
-- Upcoming XSLT/XSL-FO, UBL and code list hands-on training classes: : Sydney, AU 2009-01/02; Brussels, BE 2009-03; Prague, CZ 2009-03 Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video sample lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg Video course overview: http://www.youtube.com/watch?v=VTiodiij6gE G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal