Re: Key and document() problem ?
> You don't explain why you don't have the for-each loop ... Because I want to calculate only one value, taking all steps. I used to have outupts like <site> <step id="1" sum="x" count="x" value="x" /> <step id="2" sum="x" count="x" value="x" /> </site>
Sorry, I'm lost ... I cannot tell from your one-line example how multiple step elements are producing a single site element.
I'm not sure myself. My phphinfo gives me 1.1.14 for libxslt and libexslt, 2.6.19 for libxslt compiled against libxml.
Okay, that's XSLT 1.
So, this morning my head was clear and maybe just writing down my problem helped me understand it better.
Well, it hasn't helped me understand your problem better. Sorry.
Here is my solution :
Seeing what you've written is only helpful when you've given the anticipated inputs and outputs and what your wrong outputs are that need to be repaired.
Couting the steps for wich the test is not over the timeout <xsl:key name="firstrequest-key" use="concat(../../@id, ../@id)" match="job/universe/monitor/step/request"/>
You might be needing "@id = current()/request/@id" but that would only work if your current node at the time you declare this variable is a step. Which might be implied by your introductory sentence, but I'm not convinced.
Usually, within my for-each loop, I could declare variables containing ids, but here I don't know how to get it...
The current() function is in XSLT, not XPath, and it returns the node that was the current node at the point where the evaluation of the XPath address began.
I hope this helps.
. . . . . . . . . . . . . . Ken
-- Upcoming XSLT/XSL-FO hands-on courses: Wellington, NZ 2009-01 Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video sample lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg Video course overview: http://www.youtube.com/watch?v=VTiodiij6gE G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format