W3C home > Mailing lists > Public > www-forms@w3.org > October 2006

XForms: Conditional display?

From: Abishek Bellamkonda <abi.bellamkonda@roadhouse.com.au>
Date: Mon, 2 Oct 2006 11:57:44 +1000
Message-ID: <235B5412B02A384F884284379E2B84F222CAFA@rh-hq.hq.roadhouseinteractive.com.au>
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
		<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"/>

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/*">
	<case test="name()='Cat'">
		<!-Display for cat -->
	<case test="name()='Dog'">
		<!-Display for Dog -->
	<case test="name()='Rat'">
		<!-Display for rat -->

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:18 UTC