This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: accessing node[$position]
- From: spiders frommars <arachni42 at yahoo dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 4 Jun 2002 08:38:03 -0700 (PDT)
- Subject: Re: [xsl] accessing node[$position]
- Reply-to: xsl-list at lists dot mulberrytech dot com
--- Peter Davis <pdavis152@attbi.com> wrote:
> I'm not sure what the real problem is, but you could
> try this:
>
> descendant::page[position() = $the_position]
Thanks for the reply. I already tried that, and it
still doesn't work.
I'm trying to do this in a recursive function, where
$the_position is a parameter that is incremented with
each call (except in special cases, where I pass a
different value). As mentioned before, if I simply do
the value-of I get the correct number. Typing in a
number directly works fine.
> Looking at the XPath spec, section 2.4, 3rd
> paragraph, it appears that the way
> you are doing it should work as you expect, so long
> as $the_position is
> actually a number of course. Does Xselerator have
> any documented bugs
> related to your issue?
I don't know.. but I've also been working on this in
XMLSpy, which also has the problem (except that I
can't step through it in XMLSpy). Although, oddly
enough in my experimentation, when I typed the
following in the main template, blah worked as a
position, but not blah2:
<xsl:variable name="blah" select="5"/>
<xsl:variable name="blah2">5</xsl:variable>
Neither worked in Xselerator, though.
I'm beginning to think it's the hex I put on my
computer last week. I really should avoid those hexes.
-Jennifer
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list