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

Re: Using absolute path when context item is an atomic

Subject: Re: Using absolute path when context item is an atomic value xslt 2.0
From: andrew welch <andrew.j.welch@xxxxxxxxx>
Date: Tue, 18 Oct 2005 17:05:45 +0100
Re:  Using absolute path when context item is an atomic
On 10/18/05, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> Because "absolute paths" are not absolute at all: they select relative to
> the root of the tree containing the context node. You've got to know which
> document to look in.

Ok.... but when you do:

<xsl:for-each select="1 to 10">

The "context node" is an atomic value - how do you anything useful
here?  Do you need to do:

<xsl:variable name="currentElem" select="."/>
<xsl:for-each select="1 to 10">
   <xsl:value-of select="$currentElem/whatever"/>

This seems cumbersome, so I'm probably not using "1 to 10" in the correct

Actually, I can't see why '/' would ever select anything when the
context item is an atomic value, so why doesn't it keep it's pointer
to the original root... (I haven't got around to learning about
processing atomic values just yet so maybe it will become clear later

Current Thread


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.
First Name
Last Name
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.