This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: fixed position


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]