You probably need unique parameter Names.
try the following code:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
Parameters are : <br/>
<xsl:for-each select="/Parent/Class/Parameter[not(Name =
preceding::Parameter/Name)]">
<xsl:value-of select="Name"/><br/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
HTH
Vasu
From: "Raghava Rao" <call_raghava(_at_)hotmail(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] How can repitition be avoided in XSL
Date: Tue, 15 Oct 2002 19:25:51 +0000
How can repitition be avoided with xsl for the example input xml and
output html file given below:
Input XML
<Parent>
<Class>
<Parameter>
<Name>P1</Name>
<Type>str</Type>
</Parameter>
<Parameter>
<Name>P2</Name>
<Type>int</Type>
</Parameter>
<Parameter>
<Name>P3</Name>
<Type>str</Type>
</Parameter>
<Parameter>
<Name>P4</Name>
<Type>str</Type>
</Parameter>
</Class>
<Class>
<Parameter>
<Name>P5</Name>
<Type>str</Type>
</Parameter>
<Parameter>
<Name>P1</Name>
<Type>str</Type>
</Parameter>
<Parameter>
<Name>P6</Name>
<Type>str</Type>
</Parameter>
</Class>
</Parent>
output HTML
Parameters are:
P1
P2
P3
P4
P5
P6
Thank you.
Raghava
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
_________________________________________________________________
Unlimited Internet access -- and 2 months free! Try MSN.
http://resourcecenter.msn.com/access/plans/2monthsfree.asp
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list