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]
Other format: [Raw text]

Question reqarding display the content pending on the number of elements




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

_________________________________________________________________
¦b http://explorer.msn.com.hk/intl.asp §K¶O¤U¸ü MSN Explorer¡C


 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]