I'm developing an XForms using Orbeon 4.0 M6.
The problem I am seeing is that a <xf:input/> referencing an element defined as xs:date type by the schema, is in fact rendering as a text input rather than a date picker. The interesting thing is that if I enter a valid xs:date value into the text box, then it switches to become a date picker! So it is almost as if the schema hasn't been processed by the XForms processor by the time it renders the form. I intend to upgrade to Orbeon 4.0 M10 as soon as time allows and will retest then. But can I just ask if this is a known issue? -Stian -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Hi Stian,
This is a known issue, and it is a limitation of the library we use to process schemas. That library, given a schema and an instance, tells us if nodes are invalid, and what their type is. However, if the schema says a node is an xs:date, but the value isn't of that type, the validator reports the error, but doesn't tell us that the node is of type xs:date. This is arguably correct, since the value isn't an xs:date, but doesn't allow us to render the field as a date field. It is only when you enter a valid date that the schema validator tells Orbeon Forms the node is of type date, and that Orbeon Forms is able to change the appearance of the field. So, for now, you have to explicitly set the type for those date fields from within Form Builder. Obviously, this is not idea, but does it make sense? Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
In reply to this post by Stian Sigvartsen
Hi Alex
Yes, I can see how the library implementation could be considered correct from an instance perspective. I was hoping to have all type bindings defined via schema, because the XForm I'm developing is essentially a SOAP webservice client and the WSDL includes all relevant schemas and hence type bindings. I was hoping not to "get involved" in type binding. Do you know if the library would consistently behaving this way for all schema simple types? For example, would the library not inform Orbeon of a xs:boolean node's type even if the node's current value is not true/false? -Stian -----Original Message----- From: Alessandro Vernet [mailto:[hidden email]] Sent: Wed 9/12/2012 02:36 To: [hidden email] Subject: [ops-users] Re: Schema binding issue with element of type xs:date and <xf:input/> Hi Stian, This is a known issue, and it is a limitation of the library we use to process schemas. That library, given a schema and an instance, tells us if nodes are invalid, and what their type is. However, if the schema says a node is an xs:date, but the value isn't of that type, the validator reports the error, but doesn't tell us that the node is of type xs:date. This is arguably correct, since the value isn't an xs:date, but doesn't allow us to render the field as a date field. It is only when you enter a valid date that the schema validator tells Orbeon Forms the node is of type date, and that Orbeon Forms is able to change the appearance of the field. So, for now, you have to explicitly set the type for those date fields from within Form Builder. Obviously, this is not idea, but does it make sense? Alex -- View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Schema-binding-issue-with-element-of-type-xs-date-and-xf-input-tp4655707p4655732.html Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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 OW2 mailing lists service home page: http://www.ow2.org/wws winmail.dat (5K) Download Attachment |
Administrator
|
Hi Stian,
Yes, unfortunately I believe that this is how the library behaves for all types: if the value isn't of the expected type, it won't "tell" Orbeon Forms that the node is of that type. Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |