xsl-list
[Top] [All Lists]

Re: [xsl] an error I do not understand

2011-09-29 19:12:57


On 2011-09-30 02:07, Graydon wrote:
   <xsl:key match="area" name="name2Area" use="@area"/>
   <xsl:template match="/">

Try memorizing the root before the context gets lost (because of the atomic values in for-each):

<xsl:variable name="root" select="root()" as="document-node(element(wkna-shared-cms))" />

     <xsl:for-each select="$areaNames">
       <!-- F [Saxon-PE 9.3.0.5] Leading '/' cannot select the root node of the 
tree containing the context item: the context item is an atomic value -->
       <xsl:sequence select="key('name2Area',current())"/>

And then use
key('name2Area',current(), $root)

Untested though…

Gerrit

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>