This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: fixed position
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] fixed position
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Thu, 2 Aug 2001 09:28:33 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> 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