resulting XML after schema validation isn't correct

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

resulting XML after schema validation isn't correct

Philip.Cantin
Hi All,

I'm running into another strange case with Orbeon, this time with schema validation.

In this case, when I enter valid data in the input fields and then press the 'Save' button, everything works fine. However, when I go to check the XML, it looks like this:


<metadata>
   <idinfo>
      <citation>
         <citeinfo>
            <origin>somewhere</origin>
            <pubdate>2009</pubdate>
            <pubtime>0930</pubtime>
         </citeinfo>
      </citation>
      <crossref>
         <citeinfo>
            <origin/>
            <pubdate>2009</pubdate>
            <pubtime>0945</pubtime>
         </citeinfo>
      </crossref>
   </idinfo>
</metadata>


where the second origin element is missing its data. I don't get this problem when pubdate and pubtime are of basic types such as xs:date and xs:time, but for more complicated simple types such as the ones in my schema, it does. I'm not sure if it's a problem with my schema logic, or something about my schema that Orbeon doesn't like.

Attached below are the XSD and XHTML files I was using to produce this error. Thanks in advance for any suggestions or ideas!


~Philip


test_validation.xhtml

test_validation.xsd
Reply | Threaded
Open this post in threaded view
|

Re: resulting XML after schema validation isn't correct

Alessandro Vernet
Administrator
Philip,

Philip.Cantin wrote
I'm running into another strange case with Orbeon, this time with schema validation.

In this case, when I enter valid data in the input fields and then press the 'Save' button, everything works fine. However, when I go to check the XML, it looks like this:
[...]
What should I enter in the 6 text fields before hitting the Save button to reproduce this?

Alex
Reply | Threaded
Open this post in threaded view
|

Re: resulting XML after schema validation isn't correct

Philip.Cantin
Alex,


Alessandro Vernet wrote

What should I enter in the 6 text fields before hitting the Save button to reproduce this?

Alex

For each Originator text field, just type any string, such as "something". For each Publication Date text field, type "2009". For each Publication Time text field, type "0945".


~Philip
Reply | Threaded
Open this post in threaded view
|

Re: resulting XML after schema validation isn't correct

Alessandro Vernet
Administrator
Philip,

Philip.Cantin wrote
For each Originator text field, just type any string, such as "something". For each Publication Date text field, type "2009". For each Publication Time text field, type "0945".
OK, I see. Indeed, this is a bug. I created a bug report for this and assigned to it our highest priority. We'll try to post an update here as well when this is fixed. Thank you for the detailed bug report with reproducible test case; that really helps us.

http://forge.ow2.org/tracker/index.php?func=detail&aid=313699&group_id=168&atid=350207

Alex
Reply | Threaded
Open this post in threaded view
|

Re: resulting XML after schema validation isn't correct

Alessandro Vernet
Administrator
Philip,

Alessandro Vernet wrote
OK, I see. Indeed, this is a bug. I created a bug report for this and assigned to it our highest priority. We'll try to post an update here as well when this is fixed. Thank you for the detailed bug report with reproducible test case; that really helps us.

http://forge.ow2.org/tracker/index.php?func=detail&aid=313699&group_id=168&atid=350207
I looked at this one in more details, and actually this isn't caused by a bug in Orbeon Forms, but by a typo in the source. One input control was not in the XForms namespace as it should, and so the entering a value in that input was not updating the instance. That input is on line 145, and you can find the updated source here: http://pastie.org/487028.

Alex