[Xsltforms-support] xsi:type validation in instance document error
Brought to you by:
alain-couthures
From: <bc...@sh...> - 2016-10-31 09:02:09
|
Good morning everyone I am looking for clarification on how XSLTForms handles instance documents where elements may contain xsi:type attributes (see snippet below), with regards to the requirement for and location of schemas. Currently I pull in an instance document where this is the case and XSLTForms is throwing up the error: "Schema for namespace undefined not defined for type co" - followed by an exception: "Error dispatching event 'xforms-model-construct' :" Which has a check box to prevent creating additional dialogues. If the error dialogue is closed etc, then it goes away the form continues to load, however if any other action is taken (in my case I noticed it when moving amongst a repeated set), then the error occurs again and again. If I check the box to prevent creating additional dialogues the form stops responding. (Please accept that I have all the namespaces present and correct.) Now this error is most likely due to the fact that the instance document does not refer to a schema and neither does the xform have a scheme attribute on the 'model' element (or have an inline schema reference for that matter). I believe, though I am not sure, that in any case complex types (elements with child elements etc) are not checked when referring to schemas in xforms. Only simple types are validated. For my use it does not matter to check and in any case they are complex types I am referring to, so I would like to know if the XSLTForms behaviour allows for 'turning off' schema checking and if so how to do it please? and if not, what may I try to remove the error messages at least for complex types ? Thank you for the insight and comments. Regards Habs Snippet of xml in an instance document: <catalogue> . . <products> <product xsi:type="co:book"/> <uid>2344</uid> <isbn>432432</isbn> . . </product> <product xsi:type="co:magazine"/> <uid>9999</uid> <author>432432</isbn> . . </product> </products> . . </catalogue> |