xsl-list
[Top] [All Lists]

RE: creating container elements

2004-04-06 05:54:34

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



<Prev in Thread] Current Thread [Next in Thread>