Seems my posting did not reach the mailing list, as I didn't receive it
myself for 3 days. Thus I'm posting it again, hopefully with more success... Hi XForms experts, I'm quite new to XForms and would like to implement a small quiz as an exercise. Thus I've created a small XSD that defines the structure of my quiz and an JSP page using XForms to implement the quiz itself (see attachments). The quiz should be in a table like layout, having two coloumns. The first for the question and all available answers for each question, and the second for the score of the question. I've tried several variants to achieve the desired result, but without fortune. Currently I'm having these problems: * When referencing an element from a nodeset of a <xforms:repeat> element, the browser always shows a red exclamation mark (!). Why and how do I stop this? * How do I place all available answers of a question beneath each other with a <xforms:select1> element? * How do I set the score/value of a selected answer to its associated question <result> element? * How do I correctly sum up the total score of all selected answers? * Is an <xforms:help> element allowed within an <xforms:output> element? Orbeon Forms doesn't complain about that, but I think the XForms reference doesn't allow it. I guess this all is straight forward for anybody working daily with XForms, so grant grace to me. :) - bitbyter -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
On 5/7/07, BitByter <[hidden email]> wrote:
> Seems my posting did not reach the mailing list, as I didn't receive it > myself for 3 days. Thus I'm posting it again, hopefully with more success... Your second attempt went through, but it look like nobody got a chance to respond to your message until today. Everyone must be very busy here! :) > * When referencing an element from a nodeset of a <xforms:repeat> element, > the browser always shows a red exclamation mark (!). Why and how do I stop > this? Because the elements in the instance are supposed to be in the "quiz" namespace. Once you fix that you will only see the elements bound to <result> as invalid. According to the schema <result> is supposed to contain an nonNegativeInteger, but it is empty in the instance. I attached an updated version of the XForms (I removed the JSP declaration so I could run it in the XForms sandbox). > * How do I place all available answers of a question beneath each other with > a <xforms:select1> element? With CSS: .xforms-select1-full span { display:block; } > * How do I set the score/value of a selected answer to its associated > question <result> element? > > * How do I correctly sum up the total score of all selected answers? You should be able to implement those 2 with an <xforms:bind nodeset="..." calculate="..."/>. > * Is an <xforms:help> element allowed within an <xforms:output> element? > Orbeon Forms doesn't complain about that, but I think the XForms reference > doesn't allow it. Yes, that is true. I am wondering what is achieved by not allowing those for an <xforms:output>. Alex -- Orbeon Forms - Web 2.0 Forms for the Enterprise http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws quiz.xml (9K) Download Attachment |
Administrator
|
On 5/15/07, Alessandro Vernet <[hidden email]> wrote:
> Because the elements in the instance are supposed to be in the "quiz" > namespace. One more thing. I wanted to mention that you can check if your instance is valid according to your schema with the Schema sandbox where you can paste the schema in one text area, the document to validate in another text area, and get the result of the validation on the same page. http://www.orbeon.com/ops/sandbox-schema/ Alex -- Orbeon Forms - Web 2.0 Forms for the Enterprise http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Hi Alex,
thanks for the information. So does that mean that whenever the red exlamation marks appears the instance validation failed? Or are there further reasons where it may appear? Cheers, bitbyter Tuesday, May 15, 2007, 7:23:01 PM, you wrote: > On 5/15/07, Alessandro Vernet <[hidden email]> wrote: >> Because the elements in the instance are supposed to be in the "quiz" >> namespace. > One more thing. I wanted to mention that you can check if your > instance is valid according to your schema with the Schema sandbox > where you can paste the schema in one text area, the document to > validate in another text area, and get the result of the validation on > the same page. > http://www.orbeon.com/ops/sandbox-schema/ > Alex -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Hi BitByter,
On 5/16/07, BitByter <[hidden email]> wrote: > thanks for the information. So does that mean that whenever the red > exlamation marks appears the instance validation failed? Or are there > further reasons where it may appear? Yes, it either means that the node bound to the control is not valid. It can be invalid because of a schema validation error, because an <xforms:bind constraint="..."> returns false() or because there is a mismatch with the type specified in an <xforms:bind type="...">. Alex -- Orbeon Forms - Web 2.0 Forms for the Enterprise http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |