Subject: Re: xsl:for-each with atomic values and nested xsl:apply-templates
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 13 Sep 2006 23:37:31 +0100
|
> So I assume that current() results in an xs:string,
yes well it would if it ever got that far:-)
<xsl:apply-templates select="/
/ means the root node of the current document and that means
root(.) instance of document-node()
in your case . is a string so die as root() needs a node.
as always for preserving context in a for-each
<xsl:variable name="doc" select="/doc"/>
<xsl:for-each select="tokenize( 'a c', '[ ]')">
<xsl:apply-templates select="$doc/*[current() eq string(@id)]" />
David
|