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 way. 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 :)
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