Subject: Re: [xsl] banging my head against the wall (key, actually) From: "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 24 Apr 2015 14:02:29 -0000 |
Syd, Or refactoring slightly: <xsl:for-each select="key('tst', $set/duck/string(.) )"> <xsl:message>debug2: <xsl:value-of select="@n"/></xsl:message> </xsl:for-each> This way we don't "switch trees" ... But the third argument of key() is really useful, and the error is a really easy one to make (but not always so easy to detect). Cheers, Wendell On Fri, Apr 24, 2015 at 4:38 AM, Syd Bauman s.bauman@xxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: >> [Need to set context to input document using key() 3rd param] > > Doh! Thank you, Ken. Yes, that helps *very* much. If I had ever > realized key() only returns from within the context, I had completely > forgotten. > > >> (slight rewording noted below) > > Yes, rewording is better, although I did get it 1st time around. > -- Wendell Piez | http://www.wendellpiez.com XML | XSLT | electronic publishing Eat Your Vegetables _____oo_________o_o___ooooo____ooooooo_^
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] banging my head against t, Syd Bauman s.bauman@ | Thread | |
Re: [xsl] banging my head against t, Syd Bauman s.bauman@ | Date | Re: [xsl] HTML/XHTML/HTML5 Serializ, Eliot Kimber ekimber |
Month |