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

Re: Re: Grouping using a Child Node....

Subject: Re: Re: Grouping using a Child Node....
From: "Prince Ohilip" <rajavintemakan@xxxxxxxxxxxxxx>
Date: 24 Jun 2002 14:41:34 -0000
Re: Re:  Grouping using a Child Node....
Thanks All,
  I am able to solve ir using Muenchian technique using Key

Thanka a Lot,
Prince

On Mon, 24 Jun 2002 Vasu Chakkera wrote :
agreed :) ..


From: Mike Brown <mike@xxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Grouping using a Child Node....
Date: Mon, 24 Jun 2002 03:39:52 -0600 (MDT)

Vasu Chakkera wrote:
> Prince,
> The following code will help you..
>
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:template match="/">
> <xsl:for-each select="/items/item[not(type=preceding-sibling::item/type)]">
> <b><u><i>The Details of <xsl:value-of select="./type"/></i></u></b><br></br>
> <xsl:for-each select="/items/item[./type = current()/type]">
> <xsl:value-of select="./name"/>--------<xsl:value-of
> select="./value"/><br></br>
> </xsl:for-each>
> <hr></hr>
> </xsl:for-each>
> </xsl:template>
> </xsl:stylesheet>


There's no harm in the above, but I thought I'd point out that

- "./" is redundant and can be omitted.

- "<br></br>" & "<hr></hr>" can be shortened to "<br/>" & "<hr/>".

- If the output is to be serialized as HTML, <xsl:output method="html"/>
would be prudent.


- Mike
____________________________________________________________________________
mike j. brown | xml/xslt: http://skew.org/xml/
denver/boulder, colorado, usa | resume: http://skew.org/~mike/resume/


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





_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx



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



_________________________________________________________ There is always a better job for you at Monsterindia.com. Go now http://monsterindia.com/rediffin/


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.