[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: accessing node[$position]

Subject: Re: accessing node[$position]
From: spiders frommars <arachni42@xxxxxxxxx>
Date: Tue, 4 Jun 2002 08:38:03 -0700 (PDT)
Re:  accessing node[$position]
--- Peter Davis <pdavis152@xxxxxxxxx> 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.