Validation does not raise an exeption. It is incorrect because there is no NS2 namespace definition in this message (the same xml on external text editor cause schema validator to complain error).
I have unclear conclusion that XMLNSC domain does not support derived types in instance documents (which are pointed with xsi:type). Is it true? Is there any workaround to force validation of xsi:type attributes?
Should I use MRM XML parser or completely external validator (JAVA for example)?
I have unclear conclusion that XMLNSC domain does not support derived types in instance documents
No, that's not correct. XMLNSC is a fully-compliant validating XML parser. The MRM parser is not - it has a fairly long list of non-conformances. If XMLNSC is not behaving exactly as the W3C specification requires then that's a defect. Your next steps should be
- check that *none* of the xsds in your message set contain a namespace binding for prefix 'NS2'.
- check that validation is actually enabled. The best way to do this is to pass some other non-valid document to XMLNSC and verify that you get a validation error. Make sure that the XML document is well-formed but not valid according to the schema.
- if you are still sure that this is a defect, open a PMR and supply your input XML and the schemas.
I don't recommend using Java to perform the validation. This scenario should work with XMLNSC, and using Java would use a lot more CPU than than using XMLNSC. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum