|
Subject: Re: [xsl] Cannot select a node here: the context item is an atomic value From: chris <oneskiingfool@xxxxxxxxx> Date: Tue, 5 Apr 2005 16:47:19 -0600 |
As always, that did the trick. Assigning the sequence to a variable
outside of the loop is the solution.
Thanks!
On Apr 5, 2005 11:28 AM, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> You'll need to set a variable outside the outer loop, and in the inner loop
> do something like
>
> <xsl:for-each select="$s/my/xpath/query[@day=$day]">
>
> In fact, you might as well select the whole path in the variable and just
> use
>
> <xsl:for-each select="$s[@day=$day]">
>
> I would tend to use .-1 rather than position()-1, but the effect is the
> same. Actually, I would probably not build the duration from a string, but
> rather from:
>
> <xsl:variable name="one-day" select="xs:dayTimeDuration('P1D')"/> (global
> variable)
>
> then in the loop:
> <xsl:variable name="day" select=". * $one-day"/>
>
> Michael Kay
> http://www.saxonica.com/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Cannot select a node here, Michael Kay | Thread | [xsl] math return result problem, 04083259 |
| RE: [xsl] Recursion and for-each-gr, Michael Kay | Date | RE: [xsl] How to use multiple xsl:i, Michael Kay |
| Month |