Re: Re: [xslt transform & grouping] Using the Muenchia
no output at all. only <Documents></Documents> after adding <xsl:template match="Documents"> <xsl:apply-templates select="*[@filter='' or @filter=$filter]"/> I was debugging your xpaths not the whole stylesheet. You process all the Document elements twice once here: <xsl:apply-templates select="*[@filter=$filter]"/> that never produces any visible output as you don't have any templates matching Document elements (or child elements) and the default templates just copy character data so you just get character data and that is all white space as all the elements are empty so you just get the indentation without the elements. then you process them again with <xsl:for-each select="Document[@filter=$filter] so you probably want to amend that  to allow filter="" Your next problem will be Article[count(.|key('by-info',@info))=1] as that just selects the Article element that is first in this key in document order, but if the first in document order has been filtered out you will get nothing. So you probably need select="Document[@filter='' or @filter=$filter]/ Article[count(.|key('by-info',@info)[@filter='' or @filter=$filter])=1]"> so you select the first Article (after filtering) that is in this key. But it depends exactly what output you _do_ want. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
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