RE: first-of-type

Subject: RE: first-of-type
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Mon, 4 Oct 1999 17:12:16 +0100
> BTW, it seems that these predicates (first-of-type/last-of-type)
> are horribly useful, why did they get nuked?

One of the reasons was that you couldn't pair them up properly:

<xsl:if test="first-of-type()">
	<TABLE>
</xsl:if>
<TR><xsl:apply-templates/></TR>
<xsl:if test="last-of-type()">
	</TABLE>
</xsl:if>

This fails for obvious reasons!
This is what led me to the invention of the saxon:group construct:

<saxon:group group-by="name()">
<TABLE>
   <saxon:item>
   <TR><xsl:apply-templates/></TR>
   </saxon:item>
</TABLE>
</saxon:group>

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread