[xsl] Question reqarding display the content pending on the number of elements

Subject: [xsl] Question reqarding display the content pending on the number of elements
From: "林 子芯" <minikittygo@xxxxxxxxxxx>
Date: Wed, 23 Jan 2002 16:21:24 +0000


Hi
i was wandering whether anyone are able to help me out on this question...

this is my problem in using xsl...

suppose i have a xml such as this...
<family>
<name>Smith</name>
<parent>John</parent>
<children>may</children>
<children>kit</children>
<children>wayne</children>
</family>

<family>
<name>Jones</name>
<parent>Jason</parent>
<children>Jay</children>
</family>
....and so on

i wish to transform the data into a text format such as this: -
/*-----------------------------------------*/
name of the family: smith
parent: John
Children: may, kit, wayne

name of the family: jones
parent: Jason
Children: Jay
/*-------------------------------------*/

the question is, how do i insert the comma at the end of each children element using xsl stylesheet BUT not adding a comma for the last children (e.g. wayne for the smith and Jay)? in addition, is there a way to use xsl:if statment that will give a condition that states "if the number of element (children in the above example) are more than 1"

many thanks for your help

regards Kit

_________________________________________________________________
在 http://explorer.msn.com.hk/intl.asp 免費下載 MSN Explorer。


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



Current Thread