- From: Asier Ortiz de Urbina <asierurbina@euskalnet.net>
- Date: Mon, 27 Jan 2003 23:31:42 +0100
- To: www-forms@w3.org
Hi, I have created this file using XForms: <head> <title>Example</title> <xforms:model id="mdlResult"> <xforms:instance> <Country> <countryName/> <cityName/> </Country> </xforms:instance> </xforms:model> <xforms:model id="mdlData"> <xforms:instance id="instData"> <countries> <country>France <cities> <city>Paris</city> <city>Lyon</city> <city>Burdeaux</city> </cities> </country> <country>Spain <cities> <city>Madrid</city> <city>Barcelona</city> <city>Sevilla</city> </cities> </country> <country>Italy <cities> <city>Roma</city> <city>Milano</city> <city>Florence</city> </cities> </country> </countries> </xforms:instance> </xforms:model> <link rel="stylesheet" href="/main.css" type="text/css" /> </head> <body> <div class="body"> <h1>Example</h1> <xforms:group ref="xforms:instance('instData')"> <xforms:select1 model="mdlResult" ref="//countryName" style="width:40ex;display:block;"> <xforms:label>Select a country</xforms:label> <xforms:item> <xforms:label>France</xforms:label> <xforms:value>France</xforms:value> </xforms:item> <xforms:item> <xforms:label>Spain</xforms:label> <xforms:value>Spain</xforms:value> </xforms:item> <xforms:item> <xforms:label>Italy</xforms:label> <xforms:value>Italy</xforms:value> </xforms:item> </xforms:select1> <xforms:select1 model="mdlResult" ref="//cityName" style="width:40ex;display:block;"> <xforms:label>Select a city</xforms:label> <xforms:itemset nodeset="<!--I HAVE THE PROBLEM HERE-- >"> <xforms:label ref="."/> <xforms:value ref="."/> </xforms:itemset> </xforms:select1> </xforms:group> </div> </body> When a person selects a contry in the first "xforms:select1", I would like to see in the second "xforms:select1" the names of the cities of the selected country. I know I have to use a XPath expression in "<!--I HAVE THE PROBLEM HERE-->" but I canīt find the appropiate expresion. Can somebody help me, please? Thank you.
Received on Tuesday, 28 January 2003 04:16:25 UTC