Subject: RE: [xsl] sending parameters with apply-templates doesn't work? From: sara.mitchell@xxxxxxxxx Date: Wed, 17 Jul 2002 14:08:32 -0400 |
The syntax is valid and should work, but I think you're running into problems because of document() in the select -- this matches the root node of the document in $querystr, *not* the bookmarkedcategories nodes. Do you have a template for the root node that also has the param? Something like this: <xsl:template match="/"> <xsl:param name="selectedcategory"> <xsl:apply-templates> <xsl:with-param name="selectedcategory" select="$selectedcategory"/> </xsl:apply-templates> </xsl:templates> If not, what is happening is that the param isn't getting passed to the template for bookmarkedcategories. Sara > -----Original Message----- > From: Mattias Konradsson [mailto:preacher@xxxxxxxxxxx] > Sent: Wednesday, July 17, 2002 10:50 AM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] sending parameters with apply-templates doesn't work? > > > Hmmm am I doing something really stupid here? > > What i need to do is to send a parameter with an > apply-templates call, like > this: > > <xsl:apply-templates select="document($querystr)"><xsl:with-param > name="selectedcategory">1</xsl:with-param></xsl:apply-templates> > > which is then picked up by this template: > > <xsl:template match="bookmarkcategories"> > <xsl:param name="selectedcategory"/> > ... > </xsl:template> > > This generates no under the .Net on the MS platform parser > but the parameter > doesn't get passed either, is it a parser bug or something > I'm doing? Any > workaround > possible, can't come up with another good way to pass an > parameter to a > attribute set fetched through document... > > best regards > --- > Mattias Konradsson > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] sending parameters with a, David Carlisle | Thread | Re: [xsl] sending parameters with a, Mattias Konradsson |
RE: [xsl] <xsl:choose>'ing from dif, Michael Kay | Date | RE: [xsl] Translating character ent, Michael Kay |
Month |