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

Re: Interesting : Selecting unique value of an attribute

Subject: Re: Interesting : Selecting unique value of an attribute
From: Tom Mullen <Tom.Mullen@xxxxxxxxxxx>
Date: Thu, 24 Aug 2000 07:55:30 +0000 (GMT)
xslt unique value
Paul,

>I don't know about the method

I think it might be in the FAQ, but if not I found an excellent description
at Jeni Tennison's tutorials (useful bookmark):

http://www.jenitennison.com/xslt

>but what do you mean by :
>count(. | key('entryval', @entry)[1])

(This is better explained at Jeni's tutorials but..) Counting the nodes of
this expression will return 1 if the current node is the first index node
with this value for the entry attribute.  It will return 2 if it is not the
first. 

The key function gets all the index nodes with an entry value the same as
the current node.  The [1] predicate filters these so that only the first
of these nodes is selected. Since the union operator (|) does not produce a
node-set with the same node repeated then the current node will not be
added if it is the first of these nodes.

>
>It makes my processor stop, because the argument is a mix of nodes and 
>boolean operator.
>

How do you know that this is the cause for the processor freeze?  What XSLT
processor are you using?

Thanks

Tom

-----------------------------------------------------------------
        Visit our Internet site at http://www.reuters.com

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.


 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-2011 All Rights Reserved.