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

Re: Muenchian method on nodes with two or more items f

Subject: Re: Muenchian method on nodes with two or more items for indexing
From: "Larry Hayashi" <larry_hayashi@xxxxxxxxxxx>
Date: Mon, 23 Sep 2002 21:40:24 -0500
larry hayashi
Thanks J.

This worked great! Just a few corrections for reference on the list (and for my own future purposes :} ). And sorry about not trimming down the content before resending on the previous message.

Thanks again. Saved me from a lot more frustration.

Larry

Corrections to below:

<xsl:for-each select="//LexicalDatabase//index[generate-id(.)=
            generate-id(key('entries-by-index',.))]">
                                               ^

<xsl:variable name="entry"
            select="(ancestor::*[parent::LexicalDatabase])[1]"/>
                               ^


From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Muenchian method on nodes with two or more items for indexing
Date: Fri, 20 Sep 2002 21:46:11 +0200


larry_hayashi@xxxxxxxxxxx wrote:
  <xsl:key name="entries-by-index" match="//LexicalDatabase/*"
use=".//index"/>
       ^^^
Bad idea. I think you actually want to group the "index" elements
by their content:

   <xsl:key name="entries-by-index" match="index" use="."/>
   <xsl:template match="/">
     <xsl:for-each select="//LexicalDatabase//index[generate-id(.)=
            generate-id(key('entries-by-index',index))]">
       <xsl:sort select="." order="ascending" />
       <xsl:variable name="entry"
            select="(ancestor[parent::LexicalDatabase])[1]"/>
       <IndexItem value="{.}">
         <xsl:for-each select="key('entries-by-index', .)">
           <entry base="{$entry/base}"/>
         </xsl:for-each>
       </IndexItem>
     </xsl:for-each>
   </xsl:template>



_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



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.