XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 21st, 2011, 11:19 AM
craigj craigj is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Scotland, 55n53, 4w15
Posts: 156 craigj User rank is Sergeant Major (2000 - 5000 Reputation Level)craigj User rank is Sergeant Major (2000 - 5000 Reputation Level)craigj User rank is Sergeant Major (2000 - 5000 Reputation Level)craigj User rank is Sergeant Major (2000 - 5000 Reputation Level)craigj User rank is Sergeant Major (2000 - 5000 Reputation Level)craigj User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Day 7 h 27 m 7 sec
Reputation Power: 57
Multiple joins in XSLT - major confusion

My source XML is:
Code:
<Data>

    <YogaClass courseId="A" endDate="April"/>
    <YogaClass courseId="B" endDate="April"/>
    <YogaClass courseId="C" endDate="July"/>

    <Session courseId="A">
        <Recruit id="1" attended="yes"/>
        <Recruit id="2" attended="yes"/>
        <Recruit id="3" attended="no"/>
        <Recruit id="4" attended="yes"/>
    </Session>

    <Session courseId="A">
        <Recruit id="1" attended="yes"/>
        <Recruit id="2" attended="yes"/>
        <Recruit id="3" attended="no"/>
        <Recruit id="4" attended="yes"/>
    </Session>

    <Session courseId="B">
        <Recruit id="5" attended="yes"/>
        <Recruit id="6" attended="yes"/>
        <Recruit id="7" attended="no"/>
    </Session>

    <Session courseId="C">
        <Recruit id="8" attended="yes"/>
        <Recruit id="9" attended="yes"/>
        <Recruit id="10" attended="no"/>
        <Recruit id="11" attended="yes"/>
    </Session>

    <Recruit id="1" gender="Male" />
    <Recruit id="2" gender="Female" />
    <Recruit id="3" gender="Female" />
    <Recruit id="4" gender="Female" />
    <Recruit id="5" gender="Male" />
    <Recruit id="6" gender="Female" />
    <Recruit id="7" gender="Female" />
    <Recruit id="8" gender="Female" />
    <Recruit id="9" gender="Male" />
    <Recruit id="10" gender="Female" />
    <Recruit id="11" gender="Female" />

</Data>


I want to work out:

The number of male recruits who attended at least 50% of sessions for any yoga course ending in April'.

But I just can't get my head around how to do all the joins. Is this possible in XSLT?

Last edited by craigj : April 21st, 2011 at 11:24 AM.

Reply With Quote
  #2  
Old April 21st, 2011, 12:08 PM
requinix's Avatar
requinix requinix is offline
Still alive
Click here for more information.
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,703 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 4 Days 5 h 39 m 40 sec
Reputation Power: 8969
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
You can't really do JOINs, but you can search for nodes that match a condition.

Task for you:
If you were to manually calculate the answer, how would you do it?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Multiple joins in XSLT - major confusion

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap