Subject: RE: creating container elements
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 6 Apr 2004 13:54:34 +0100
|
> When I first approached this I tried using something such as
>
> <xsl:if test="postion() = 1">
> <container>
> </xsl:if>
>
> but this complained as it was not valid XML.
>
Like many newcomers to XSLT, you are thinking in terms of tags rather than
nodes. An XSLT stylesheet writes nodes to a result tree, not tags to a
serial file, and you can't write half a node.
Your problem is a grouping problem of some kind, and you should read
http://www.jenitennison.com/xslt/grouping
Michael Kay
|