xsl-list
[Top] [All Lists]

Re: Re: [xslt transform & grouping] Using the Muenchian Method?

2004-10-06 03:16:26
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="*[(_at_)filter='' or @filter=$filter]"/>
       <Documents>
<xsl:for-each select="Document[(_at_)filter='' or @filter=$filter]/Article[count(.|key('by-info',@info)[(_at_)filter='' or @filter=$filter][1])=1]">
               <Document name="{(_at_)info}">
<xsl:copy-of select="key('by-info',@info)[(_at_)filter=$filter]"/>
               </Document>
           </xsl:for-each>
       </Documents>
   </xsl:template>

The xsl:apply-templates select="*[(_at_)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


<Prev in Thread] Current Thread [Next in Thread>