>
Quote:
As I said before, nothing will work if you do not include the sorted nodes
in an RTF and transform them to a temporary tree. Then you can perform the
Muenchian method on this temporary tree.
>
Actually, you'll be able to:
1. Perform the Muenchian method (no sorting is necessary).
2. Do the sorting
So, this is a very simple exercise in grouping.
This transformation:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:key name="kGN" match="gamename" use="." />
<xsl:template match="/">
<games>
<xsl:for-each select=
"/*/*/gamename[generate-id()
=
generate-id(key('kGN',.)[1])
]">
<xsl:sort/>
<xsl:copy-of select=".."/>
</xsl:for-each>
</games>
</xsl:template>
</xsl:stylesheet>
when applied on your original source xml document:
<GameSets>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>10th Anniversary</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>Anarchs</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>Ancient Hearts</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>Bloodlines</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>Camarilla</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Netrunner</gamename>
<setname>Classic</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>Dark Sovereigns</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>Final Nights</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>Gehenna</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>Jyhad</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>Kindred Most Wanted</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>Legacies of Blood</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Netrunner</gamename>
<setname>Netrunner</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>Nights of Reckoning</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>Promotional</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Netrunner</gamename>
<setname>Proteus</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>Sabbat</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>Sabbat War</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>The Black Hand</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>V:TES</setname>
</GameSetsRow>
</GameSets>
produces the desired sorted output for all (2 in this case) uniquely named
games:
<games>
<GameSetsRow>
<gamename>Netrunner</gamename>
<setname>Classic</setname>
</GameSetsRow>
<GameSetsRow>
<gamename>Vampire: The Eternal Struggle</gamename>
<setname>10th Anniversary</setname>
</GameSetsRow>
</games>
Hope this helped.
Cheers,
Dimitre Novatchev
"Dimitre Novatchev" <dimitren@tpg.com.auwrote in message
news:4504435c$0$97249$892e7fe2@authen.yellow.readf reenews.net...
Quote:
>
"Christoph" <jcboget@yahoo.comwrote in message
news:45034e03$0$3566$815e3792@news.qwest.net...
Quote:
Quote:
>>extension function on it. The xxx:node-set() ext. fn. is usually
>>provided by the particular XSLT Processor vendor and the prefix "xxx" is
>>typically bound to a vendor-specific namespace. If the XSLT Processor
>>supports EXSLT, then the exslt:node-set() ext. fn. can be used and the
>>xslt code will be portable accross XSLT processors that support EXSLT.
>>
>Is there a XSLT processor that works in both IE and Firefox?
>>
>>
>I've read alot about the Muenchian Method alot today while looking into
>how I
>might be able to solve this problem. The main thing I've been running
>into is that
>it doesn't seem to work properly with a <xsl:sortsorted data set...
>Nothing I've
>tried using this method seemed to do the trick. :(
>
As I said before, nothing will work if you do not include the sorted nodes
in an RTF and transform them to a temporary tree. Then you can perform the
Muenchian method on this temporary tree.
>
>
Cheers,
Dimitre Novatchev.
>
Quote:
>>
>thnx,
>Christoph
>>
>
>