[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: [xslt transform & grouping] Using the Muenchia

Subject: Re: Re: [xslt transform & grouping] Using the Muenchian Method?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 5 Oct 2004 17:48:52 +0100
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


so you probably want to amend that [] to allow filter=""

Your next problem will be


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])=1]">

so you select the first Article (after filtering) that is in this key.

But it depends exactly what output you _do_ want.


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:

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.