[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: Anton Triest <anton@xxxxxxxx>
Date: Wed, 06 Oct 2004 12:16:26 +0200
xslt muenchian counting
Michael PG wrote:

> I don't think that's there'a an bug in msxml.

Personally, I wouldn't bet on that ;), but there must be a bug somewhere,
I get the same result as Werner (with Saxon, Transformiix and MSXML3).

There are a few oddities in your stylesheet, but they shouldn't cause any exception.
The exception details you posted point to "line 60", is that the xsl:for-each with
the xpath David suggested? There is nothing wrong with that xpath (I bet on that :).
But how can it be line 60 in such a short stylesheet?


About the stylesheet: I think you misunderstood one of my previous messages (with the xsl:apply-templates).

<xsl:template match="Documents">
<xsl:apply-templates select="*[@filter='' or @filter=$filter]"/>
<Documents>
<xsl:for-each select="Document[@filter='' or @filter=$filter]/Article[count(.|key('by-info',@info)[@filter='' or @filter=$filter][1])=1]">
<Document name="{@info}">
<xsl:copy-of select="key('by-info',@info)[@filter=$filter]"/>
</Document>
</xsl:for-each>
</Documents>
</xsl:template>


The xsl:apply-templates select="*[@filter='' or @filter=$filter]" will do nothing,
because there is no template match="Document" in the stylesheet.
You better remove that line (although it should not influence the result).


I would advise you to try out a different processor, if only for debugging.
Instant Saxon is very good and it's free:

http://saxon.sourceforge.net/saxon6.5.3/instant.html (info)
http://prdownloads.sourceforge.net/saxon/instant_saxon6_5_3.zip (download)

Best regards,
Anton

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.