This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Question reqarding display the content pending on the number of elements
- From: "=?big5?B?qkwgpGyq5A==?=" <minikittygo at hotmail dot com>
- To: XSL-List at lists dot mulberrytech dot com
- Date: Wed, 23 Jan 2002 16:21:24 +0000
- Subject: [xsl] Question reqarding display the content pending on the number of elements
- Reply-to: xsl-list at lists dot mulberrytech dot com
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