Subject: RE: [xsl] weird behavior with last() From: "Michael Kay" <mhkay@xxxxxxxxxxxx> Date: Wed, 25 Jul 2001 08:52:25 +0100 |
> <xsl:template match="MainMenuItem"> > <b><a href="{@URL}"><xsl:apply-templates > /></a></b><xsl:if > test="position()!=last()"> | </xsl:if> > </xsl:template> > > If I transform it like it is, I get an end "|" after > the last <MainMenuItem> (not correct behavior) You can't tell whether a MainMenuItem is the last() by looking at the source XML or by looking at this template rule. You can only tell by looking at how the template rule is invoked. The last() item is the last one in the set of nodes selected by the <xsl:apply-templates/> instruction that caused this template to be invoked - which you haven't shown us. Mike Kay Software AG > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] weird behavior with last(, Oleg Tkachenko | Thread | RE: [xsl] getting XSL to ignore a l, Benoit_Aumars |
Re: [xsl] Remote source document, Oliver Becker | Date | RE: [xsl] Remote source document, Rene de Vries |
Month |