xsl-list
[Top] [All Lists]

Re: [xsl] xsl:key, predicates and documents.

2010-05-14 08:36:36
So, I created keys that look like this:

   <xsl:key name="term-key" select="e[(_at_)PER='n']" use="@HW"/>
   <xsl:key name="person-key" select="e[(_at_)PER='y']" use="@SUR"/>
...
<xsl:template match="eData[(_at_)PERS='n']">
   <xsl:variable name="exact" select="key('term-key', @HW)"/>
   ...

</xsl:template>

We know that there are matches yet this doesn't work unless
we remove the predicate from the key definition. Are predicates
usable in key definitions?

It's much harder to help without seeing any input, but I can see a PER
vs PERS difference in the code there... is that it?


-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
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>
--~--