[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,
If you just want to filter out some elements based on an attribute value, you can combine the grouping and the filtering in one step, something like <xsl:for-each select="Document/Article [count(.|key('by-info', @info)[1])=1 and not(@info='main')]"> That would give the same output, but without the Article elements that have a info="main" attribute. Given that your output completely reorganizes the document, I don't see much use in an identity transform... Except of course if your Documents element is part of a much larger input file, where you need a copy of the file with only the Documents element modified. In such case, I guess you could put the grouping/filtering template in filter.xslt. I'm not sure why you include filter.xslt in base.xslt, and not the other way around - then you have one "general" base.xslt that you can include in any number of more "specialized" stylesheets? Best regards, Anton Michael PG wrote: Hello Anton,
|
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
|