This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: further question regarding the use of Muenchian Method



Hi: 
furthermore onto this question, how it it is to assign a multiple key? my 
approach for multiple key is as follows:- 
<xsl:key name="SortAuthor" match="adventure | sci-fi/star-trek" 
use="author"/>
and the fragment code is as follows: 

<xsl:for-each select="booklist[generate-id() = 
generate-id(key('SortAuthor', adventure/author | 
sci-fi/star-trek/author)[1])]">
<books>
<author>
<xsl:value-of select="adventure/author | sci-fi/star-trek/author"/>
</author>
....more code
</books>
</xsl:for-each>

but it seems it doesnot regonise anything, please can somebody help me out 
on this one
Mank thanks
Regards
Kit


>From: "Michael Kay" <michael.h.kay@ntlworld.com>
>Reply-To: xsl-list@lists.mulberrytech.com
>To: <xsl-list@lists.mulberrytech.com>
>Subject: RE: [xsl] further question regarding the use of Muenchian Method
>Date: Mon, 15 Apr 2002 20:01:37 +0100
>
>Using multiple elements with different grouping keys shouldn't be a 
problem,
>because you can declare multiple <xsl:key> elements with the same name and
>you effectively get the union of all of them.

> > -----Original Message-----
> > From: owner-xsl-list@lists.mulberrytech.com
> > [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of 林 子芯
> > Sent: 15 April 2002 18:43
> > To: xsl-list@lists.mulberrytech.com
> > Subject: [xsl] further question regarding the use of Muenchian Method

> > i was wondering whether it is possible to group the content
> > given that they
> > belongs to a separate structure (i.e.
> > <booklist>
> > <adventure>
> > <author>author1</author>
> > <title>1</title>
> > <adventure>
> > <adventure>
> > <author>author2</author>
> > <title>2</title>
> > <adventure>
> > <adventure>
> > <author>author1</author>
> > <title>3</title>
> > <adventure>
> > <sci-fi>
> > <star-trek>
> > <author>author1</author>
> > <title>6</title>
> > </star-trek>
> > <star-trek>
> > <author>author4</author>
> > <title>9</title>
> > </star-trek>
> > </sci-fi>
> > </booklist>
> >
> > transform to
> > <booklist>
> > <books>
> > <author>author1</author>
> > <title>1</title>
> > <title>3</title>
> > <title>6</title>
> > </books>
> > <books>
> > <author>author2</author>
> > </title>2</title>
> > </books>
> > ...etc
> >
> > since there are two different 'forms' of author 'tags' (i am
> > sure there is
> > a better description) (i.e adventure/author and
> > sci-fi/star-trek)  i could
> > not generate the appropiate key for mucheun method (well at
> > least i am not
> > certain how) but is there are a way to do so?


_________________________________________________________________
MSN 相簿提供您最簡單的方式分享並列印您的相片,請移至
http://photos.msn.com/support/worldwide.aspx。


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]