XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Zeeshan JaveedSubject: Grouping very urgent .
Author: Zeeshan Javeed
Date: 28 May 2008 06:17 AM
Hi,
I am completely new to XSLT ( 1 day old ;) )
I have search a lot, but have not found answer to my problems.

1). How can i search the nodes against values of attributes. Its easy to get @attribute but how to search on their values. For example
<ex1 id=1 />
<ex2 id=1 />
<ex3 id=2 />
<ex4 id=1 />
Now how to get all the nodes having value 1 ?

If I need to get a aggregate/group how can I do that.
My problem from real life is

<order>
<items indexPrintTitle="">
<article id="10X15" netprice="0.35" >
<file crc="c27d7928dfsaf"/>
</article>
<article id="11X15" netprice="0.95" >
<file crc="c27dasdf7928"/>
</article>
<article id="10X15" netprice="0.35" >
<file crc="c27d792asdf8"/>
</article>
<article id="13X15" netprice="1.35" >
<file crc="c27d792asdf8"/>
</article>
</items>
</order>

I need to get the result
article id , 11x15 quantity 1 price = .95
article id, 10x15 quantity 2 price = .70
article id, 13x15 quantity 1 price = 1.35


Its really getting hard for me...
Any guidance will be highly appreciated.

Regards,
Zeeshan Javeed.



Posttop
Alberto MassariSubject: Grouping very urgent .
Author: Alberto Massari
Date: 28 May 2008 01:10 PM
Hi,
you can find a comprehensive explanation of grouping techniques at http://www.jenitennison.com/xslt/grouping/muenchian.html

Alberto

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.