|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: [xslt transform & grouping] Using the Muenchia
Hi Michael,
I think I see the problem. When you use: <xsl:param name="filter" select="food"></xsl:param> no elements are mached (you have no food elements at top level). This means that in this expression: <xsl:for-each select="Document[@filter=$filter]/Article[count(.|key('by-info',@info)[1])=1]"> you predicate (filter) evaluates to false, that is [@filter=$filter] is false. I think therefore that your processor stops there and does not evaluate the second predicate [count(.|key('by-info',@info)[1])=1]. Net result of this is that no elements are chosen in your for-each and therefore there is no output between <document> and </document> When you did, as David Carlisle suggested, change your top-level param to: <xsl:param name="filter" select="'food'"></xsl:param> the first predicate returns true (at least for some of the elements). Then the second predicate _will_ be evaluated (in those case where the first is true). As you have not defined the key (by-info), the processor chokes on this [count(.|key('by-info',@info)[1])=1]. Therefore you need to both change your top-level param to <xsl:param name="filter" select="'food'"></xsl:param> and add a definition of your key at your top-level (see earlier post from DC). I hope that this helps. Regards, Ragulf Pickaxe :-) Listen,[snip] _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








