- From: Abishek Bellamkonda <abi.bellamkonda@roadhouse.com.au>
- Date: Mon, 2 Oct 2006 11:57:44 +1000
- To: <www-forms@w3.org>
Is there anyway where we can use a switch statement where we can display the data, based on condition? Like Xsl:Choose? Ok here is what my model is: <data> <Animals> <Cat Name="cat 1"/> <Cat Name="cat 2"/> <Dog Name="My Dog 1" CanBark="false"/> <Dog Name="Your 1" CanBark="true"/> <Rat id="Something" whatever="Something"/> </Animals> </data> Now I need to list animals in sequence, each type of animal have to be shown in different format. I can have any number of animals, animals can be in any order. If there a way where I can say <xf:repeat nodeset="Animals/*"> <xf:switch> <case test="name()='Cat'"> <!-Display for cat --> </case> <case test="name()='Dog'"> <!-Display for Dog --> </case> <case test="name()='Rat'"> <!-Display for rat --> </case> </xf:swicth> </xf:repeat> With Regards, Abi (Abishek Bellamkonda) Senior Architect / Technology Specialist / Tech Lead Roadhouse Technologies PTY. LTD. 9/663 Victoria Street Abbotsford 3067 Australia T+ 61 3 9427 7522 F+ 61 3 9427 7533 E abi@roadhouse.com.au W www.roadhouse.com.au
Received on Monday, 2 October 2006 07:14:43 UTC