Subject: Re: [xsl] Trouble using xsl:key under XSL 1.0 From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Thu, 13 Dec 2007 18:13:28 +0100 |
<xsl:key name="playerResultLookupByWeek" match="playerResult[../@week=$week]" use="@player" />
A big thing to watch out for here - the xsl:key match must be a pattern, which is required to be context-free. (Same as the match pattern in xsl:template.) And one of the big limitations to patterns is that you cannot have variable references inside them. Even if the variable is top-level, and even if it's something simple like document('')/*/someElement, it can't be used in the match pattern.
Learn to start thinking around variables in your keys, and you'll end up banging your head against the wall less often. :)
Cheers, -- Abel Braaksma
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Trouble using xsl:key und, Scott Trenda | Thread | Re: [xsl] XSL-FO list with sublist, Lucas Gonçalves Gros |
Re: [xsl] Illegal xml chars, Abel Braaksma | Date | Re: [xsl] Illegal xml chars, Colin Adams |
Month |