Subject: Re: [xsl] 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 |
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 :)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Using absolute path when , Michael Kay | Thread | RE: [xsl] Using absolute path when , Michael Kay |
RE: [xsl] Using absolute path when , Michael Kay | Date | RE: [xsl] Using absolute path when , Michael Kay |
Month |