RE: [xsl] fixed position

Subject: RE: [xsl] fixed position
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 2 Aug 2001 09:28:33 +0100
> here is an xml document
> <data>
> <item>Solution</item>
> <item>Business</item>
> <item>Strategy</item>
> <item>Technology</item>
> <item>Problem</item>
> ...................
> </data>
> 
> the output will be as
> 
> Business Strategy Technology Solution Problem ........
> 
> the position of "Solution" may change in the xml file but it 
> has to appear
> in the 4th position always.
> 
<xsl:for-each select="item[.!='Solution']">
  <xsl:copy-of select="."/>
  <xsl:if test="position()=3">
    <item>Solution</item>
  </xsl:if>
</xsl:if>

Mike Kay
Software AG 

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


Current Thread