[Home] [By Thread] [By Date] [Recent Entries]
Hi Graydon, > What's wrong with > > <xsl:template match="section"> > <xsl:copy> > <xsl:apply-templates select="@*" mode="#current" /> > <xsl:attribute name="id" > select="(preceding-sibling::*[1][self::target]/@refid,generate-id(.)) => head()" /> > <xsl:apply-templates mode="#current" /> > </xsl:copy> > </xsl:template> I normally use (expr1, expr2)[1] as an if-then-else for expressions evaluating to 0 or 1 node, but that arrow syntax is pretty neat. I should start using it. - Chris
|

Cart



