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: Attribute Names of the longest branch (Creating CSV data)


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@mulberrytech.com
[mailto:owner-xsl-list@mulberrytech.com]On Behalf Of Selva, Francis
Sent: Tuesday, 11 April 2000 7:35
To: 'xsl-list@mulberrytech.com'
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

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