- From: Klotz, Leigh <Leigh.Klotz@pahv.xerox.com>
- Date: Fri, 20 Dec 2002 15:47:44 -0800
- To: "'Roman Huditsch'" <roman.huditsch@hico.com>, "'www-forms@w3.org'" <www-forms@w3.org>
You can do something like this for your instance below. I haven't proofread this, so it probably has errors. <xforms:instance id="temp"><temp><OK>true</OK></temp></xforms:instance> <xforms:bind nodeset="//*[@xlink:href]" relevant="instance("temp")/OK or @href" /> <xforms:submission id="submission-01" method="post" action="http://..."/> ... <xforms:trigger> <xforms:label>Submit</xforms:label> <xforms:action ev:event="xforms-activate"> <xforms:setvalue ref="instance('temp')/OK">false</xforms:setvalue> <send submission="submission-01"/> </xforms:action> </xforms:trigger> You might also want to catch the xforms-submit-done and xforms-submit-error in the submission element and reset the OK value to true. -----Original Message----- From: Roman Huditsch [mailto:roman.huditsch@hico.com] Sent: Thursday, December 19, 2002 6:08 AM To: www-forms@w3.org Subject: relavant or delete Hello, Am I right that the relevant attribute within xforms:bind elements is to affect both the UI and the instance data? Which means that when the relevance for a specific instance element calculates to false, bounded UI elements get inactive and the the instance data is not submitted. I would like to make a test before my instance data gets submitted, which prevents <instanceOf> elements within my instance that contain empty xlink:href attributes to get submitted. I first thought that I could do that with the relevant attribute, but doing this all UI elements bound to the corresponding instance elements get invisible, too. So maybe a delete action triggered by a click on the submit button is the answer? That leads me to another question. What should be the correct value for the at attribute in the delete element when I want the delete action to take effect on my whole instance data? (at="//*")? my instance looks like : <xforms:instance> <topicMap id="beispiel" xmlns="http://www.topicmaps.org/xtm/1.0/" xmlns:xlink="http://www.w3.org/1999/xlink"> <topic id=""> <instanceOf> <topicRef xlink:href=""/> </instanceOf> <baseName> <baseNameString></baseNameString> </baseName> <occurrence> <instanceOf> <topicRef xlink:href=""/> </instanceOf> <resourceRef xlink:href=""/> </occurrence> <occurrence> <instanceOf> <topicRef xlink:href=""/> </instanceOf> <resourceData></resourceData> </occurrence> </topic> ... </xforms:instance> how would the delete look like, when I want every <instanceOf> element to not be submitted when the xlink:href attribute of the <topciRef> element is empty? I tried so much statements, but I wasn't able to make it work the way I want it. Please help me. wbr, Roman -----Ursprüngliche Nachricht----- Von: Mikko Honkala [mailto:honkkis@tml.hut.fi] Gesendet: Donnerstag, 19. Dezember 2002 11:59 An: Sebastian Schnitzenbaumer; CLAVIER Remi FTRD/RTA/LAN; www-forms@w3.org Betreff: Re: Recursive Form Hi Sebastian and others, I think this does not solve the complete problem. Namely it would not allow the generation of arbitrarily deep UI. One solution for XForms 2.0 (or 3.0 :)) would be to add a template mechanism, similar to xslt:template. This might be quite difficult to implement, though, because of the dynamic nature of XForms. -mikko Sebastian Schnitzenbaumer wrote: > This is not possible in XForms 1.0. One solution for future > XForms versions would be to extend the repeat semantics > and define something like "up" and "down" next to "before" > and "after" as parameters when inserting. With "down" > one could say to insert a nodeset not just next to the > selected nodeset, but to nest inside a nodeset at a given > point, which would, as far as I can see it, solve your problem. > > - Sebastian > > > ----- Original Message ----- > From: CLAVIER Remi FTRD/RTA/LAN > To: www-forms@w3.org > Sent: Wednesday, December 18, 2002 10:51 AM > Subject: RE: Recursive Form > > > I 'm working about the faisability study to translate ICS forms (defnned > by ETSI) as XForms. > My first question is : how to create recurive formes? > As an exemple, I supose the model attached to my representation is > somethig > like > > ... > > > > ... many fiield to fill in ... > > > ... > > ... > > > > > > > I need to create a Form to recursivly generate the hierarchy of paragraphs > and , of course, the tables... > I don't know the exact deep of this tree... > I try using and but at this time, I can't > obtain a correct result. > > Cane everyone help me? > > Thanks > Mr Rémi Clavier > Expert Méthodes et Outils > France Telecom R&D/RTA/D2M > 2, Avenue Pierre Marzin > 22307 Lannion > tel : +33 2 96 05 22 20 > fax: +33 2 96 05 22 20 > e_mail : remi.clavier@francetelecom.com
Received on Friday, 20 December 2002 18:48:10 UTC