xsl-list
[Top] [All Lists]

Re: understanding key usage

2004-11-22 07:02:17

thank you for your answer:

if value is a nodeset and i would like to search all B elements under it whose 
keys have a value of 'USD', how should
i define the key for this nodeset?
<value>
        <B>
                <key>USD</key>
                <value>
                        <v1>10</v1>
                </value>
        </B>
        <B>
                <key>EUR</key>
                <value>
                        <v1>10</v1>
                </value>
        </B>
</value>

I have a nodeset which consists of 'value' elements like above. I want to get a 
nodeset of B elements whose key values are same.(e.g. all the value 
elements'(in this nodeset) B elements whose keys are 'USD'.)
if nodeset is -> tempnodeset

how should i define the select clause and the key?

???<xsl:for-each select="$tempnodeset/B[generate-id()= 
generate-id(key('dkey','USD')[1])]">???


when i write <xsl:for-each select="$tempnodeset/B[key='USD')]">, i have all of 
the value elements' B elements in this nodeset whsoe keys are 'USD'. But the 
grouping with the key does not work.

any help will be appreciated.


-----Original Message-----
From: David Carlisle [mailto:davidc(_at_)nag(_dot_)co(_dot_)uk]
Sent: Monday, November 22, 2004 2:39 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [SPAM] - Re: [xsl] understanding key usage - Bayesian Filter
detected spam



opss. sorry in the second one, dovizler would be B.

I suspected as much, but as the rest of the msg hopefully showed, the two
expressions are still very different.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>