[Home] [By Thread] [By Date] [Recent Entries]

Subject: RE: further question regarding the use of Muenchian Method
From: "=?big5?b?qkwgpGyq5A==?=" <minikittygo@xxxxxxxxxxx>
Date: Tue, 16 Apr 2002 16:55:59 +0000

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@xxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE:  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@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of ªL ¤lªä
> Sent: 15 April 2002 18:43
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  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 ¬Ûï´£¨Ñ±z³Ì²³æªº¤è¦¡¤À¨É¨Ã¦C¦L±zªº¬Û¤ù¡A½Ð²¾¦Ü
http://photos.msn.com/support/worldwide.aspx¡C


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



Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member