Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 26th, 2005, 01:54 PM
Authorized User
 
Join Date: Jul 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Michael,

I have tried all of your suggestions as well as some new ones but it still doesn't work. I am not trying to think in "and then add...".
But I thought you or other readers might not understand what I am trying to explain so I thought it might be easier to explain in "and then add...".

I tried your last suggestion and all I get back is 0 as my value.

Did you even look at my code that I sent previously?

Thanks,

Grace

 
Old September 26th, 2005, 02:03 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Sure I looked at your code. It's calling sum(Time) when the context node is an IRD element, which is clearly wrong, as the IRD only has one child called Time, and summing over a single element will get you nowhere.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old September 26th, 2005, 02:29 PM
Authorized User
 
Join Date: Jul 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Michael,

I understood what you are suggesting and I have tried taken out the IRD node and that it gives me the total of the whole <Time> for one Node which is not what I want. What I am looking for is a sub total from a particular time frame that's why I have to use the <xsl:when.. /> to determine if the <ST> and <ET> fall within the From and To node which is determined by $FromStart and $ToEnd.

Man, this is confusing. I was just wondering if you understand my question or am I misleading you into another question.

Whatever suggestion that you have given me, I have tried.

I apologize if I don't understand your suggestion. Can you be a little bit more specific to what I else I can do.

Did I mention to you that I am a novice at this.

Thanks and have a wonderful day!

Grace



 
Old September 27th, 2005, 09:30 AM
Authorized User
 
Join Date: Jul 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Michael,

I just want to thanks you for all of your help and pointers. I got it working now. I guess the problem that I was having with was missing the double slashes for the predicate!

Thanks and have a wonderful day!

Grace







Similar Threads
Thread Thread Starter Forum Replies Last Post
sum and translate in XPath nwright BOOK: XSLT Programmer's Reference, 2nd Edition 2 December 5th, 2008 08:20 AM
sum function pcase XSLT 2 January 2nd, 2008 05:51 PM
Sum function and XPath problems tslag XSLT 2 June 26th, 2006 10:23 AM
SUM Function jmss66 Classic ASP Basics 17 July 29th, 2003 08:00 AM
Need Help with the Sum Function athanatos XSLT 1 July 22nd, 2003 10:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.