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

problem with using xsl:key

Subject: problem with using xsl:key
From: "=?big5?b?qkwgpGyq5A==?=" <minikittygo@xxxxxxxxxxx>
Date: Mon, 11 Feb 2002 13:07:10 +0000
big5 key
Hi... i was wondering can someone give me some advise over this question....

suppose i have such xml structure...

<persons>

<boston>
 <person>
<name>
<first>Mike</first>
<middle>M</middle>
<last>Jones</last>
</name>
<profession>Factory worker</profession>
<No_child>none</No_child>
<person>
...
</boston>
<new_york>
<person>
<name>
<first>Jess</first>
<middle>K</middle>
<last>Smith</last>
</name>
<profession>teacher</profession>
<person>

 <person>
<name>
<first>Mike</first>
<middle>M</middle>
<last>Jones</last>
</name>
<profession>Rocket scientistr</profession>
<No_child>none</No_child>
<person>
...
</new_york>
</persons>

i would like to define a key to such as group them by name.... (e.g. <xsl:key name="NameID" match="name" use="<xsl:value-of select="name">)

and then find the person with a person name Mike M Jones (first=mike follow by middle=M and last=Jones) writing such key...

<xsl:apply-templates select="key('NameID', '<xsl:value-of select="deviation">')"/>

i know this is not correct but that's probably the best i can explain the situation... can someone tell me what is the best approach to achieve the desired results?

Many thanks

Regards
Kit


_________________________________________________________________
¦b±zªº¦æ°Ê¸Ë¸m¤W¶Ç°e±µ¦¬ Hotmail ¶l¥ó¡A½Ð²¾¦Ü http://mobile.msn.com¡C


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.