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

RE: Attribute Names of the longest branch (Creating CSV data

Subject: RE: Attribute Names of the longest branch (Creating CSV data)
From: "Steve Brown" <prospect@xxxxxxxxxxx>
Date: Tue, 11 Apr 2000 09:06:37 +1000
blinky templates
To make the data I used the following templates (among others).  If you can
see any holes/problems please tell me:

<xsl:template match="@*"><xsl:value-of select="."/>,</xsl:template>

<xsl:template match="*">
	<xsl:param name="sofar"></xsl:param>
	<xsl:param name="concat"><xsl:value-of
select="$sofar"/><xsl:apply-templates select="@*" /></xsl:param>
	<xsl:apply-templates><xsl:with-param name="sofar"
select="$concat"/></xsl:apply-templates>
	<xsl:if test="count(*) = 0">
		<xsl:value-of
select="substring(string($concat),0,string-length(string($concat)))"/><xsl:t
ext>&#10;</xsl:text>
	</xsl:if>
</xsl:template>

Steve.

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Selva, Francis
Sent: Tuesday, 11 April 2000 7:35
To: 'xsl-list@xxxxxxxxxxxxxxxx'
Subject: RE: Attribute Names of the longest branch (Creating CSV data)


Steve,
   How did you display the data in that format?.Cause I have some stuff
similar to this.

Thanx,
Francis




> <books>
> 	<book bookname="blinky bill"/>
> 	<book bookname="superman">
> 		<author name="steve" age="24"/>
> 	</book>
> 	<book bookname="snugglepot">
> 		<author name="frank" age="60"/>
> 	</book>
> </books>
>
> I want to get the output:
>
> bookname,name,age
> blinky bill
> superman,steve,24
> snugglepot,frank,60
>

>
> Thanks,
>
> Steve



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


 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.