[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How can repitition be avoided in XSL

Subject: Re: How can repitition be avoided in XSL
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Wed, 16 Oct 2002 08:57:35 +0000
repitition
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@xxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject:  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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.