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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + Use of before and after string (3) Sticky Topic
-> - How do I substitute element ty... (1)
-> + How does one add working days ... (4)
-> - Help, I have existing XLT and... (1)
-> + Need help on XSLT issue - (2)
-> + EDI to XML Conversion (7)
-> - XML To JSON Conversion using X... (1)
-> + Formatting Paragraphs to same ... (2)
-> - Grouping of records (1)
-> + Problems with xsd 1.1 (4)
-> + XML to HL7 mapping (3)
-> + XSLT 3 and Iterate (2)
-> + XSL-FO to PDF preview (3)
-> + java.lang.RuntimeException: Er... (2)
-> + Create Acroforms with Stylus X... (2)
-> + How to change XSLT parameter s... (3)
-> + how to change format of the da... (2)
-> + Search "Next 8 Results " doesn... (2)
-> - Support for Git (1)
-> + newbee (8)
-- [1-20] [21-40] [41-60] Next
+ XQuery Help and Discussion (2016)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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
(Deleted User) Subject: Grouping very urgent .
Author: (Deleted User)
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

   
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.