Subject: Re: Understanding difficulties with call-template From: "Benoit Cerrina" <benoit.cerrina@xxxxxxxxxxx> Date: Thu, 26 Oct 2000 08:55:13 +0200 |
Hi don't see the need for the param, doesn't this work: <xsl:template name="comma-block"> <xsl:for-each select="preferred-location"> <xsl:value-of select="."/> <xsl:if test="position() != last()">, </xsl:if> </xsl:for-each> </xsl:template> <xsl:template match="preferred-locations"> <xsl:element name="p"> Preferred Locations: <xsl:call-template name="comma-block"/> </xsl:element> </xsl:template> of course you probably wanted it in order to have a more resusable template which would make sense. Benoit > OK got it working here this works. > > <xsl:template name="comma-block"> > <xsl:param name="nodes"/> > <xsl:for-each select="$nodes"> > <xsl:value-of select="."/> > <xsl:if test="position() != last()">, </xsl:if> > </xsl:for-each> > </xsl:template> > > <xsl:template match="preferred-locations"> > <xsl:element name="p"> > Preferred Locations: > <xsl:call-template name="comma-block"> > <xsl:with-param name="nodes" select="preferred-location"/> > </xsl:call-template> > </xsl:element> > </xsl:template> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Understanding difficulties with, robert | Thread | Re: Understanding difficulties with, Jeni Tennison |
Re: problems with xalan c++ - who t, Gary L Peskin | Date | Re: html to xml, Knut Alboldt |
Month |