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

RE: see if it is possible

Subject: RE: see if it is possible
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Fri, 14 Dec 2001 09:32:15 -0000
if it was possible
> for the following xml:
> 
> <A id ="1">
> 	<BRef Bid="1"/>
> 	<BRef Bid="2"/>
> </A>
> <A id ="2">
> 	<BRef Bid="3"/>
> </A>
> ...
> <B id="1" type="short"/>
> <B id="2" type="long"/>
> <B id="3" type="short"/>
> ...
> 
> with a known id=1 for A, how can I get the count of Bs, whose
> type="short" and id equals the Bid in BRef who are the child 
> of A, whose id =1

count(B[@type="short"][@id=current()/A[@id="1"]/BRef/@Bid)

Mike Kay
> 
> I did it by 30 lines xsl code.
> can this be done by one or a few line of code? like <xsl:variable
> name="count" select="count(......)"/>
> 
> Thanks
> 
> Long
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 

 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.