Hi Mark, On Wed, Jul 4, 2012 at 10:10 AM, Mark Brörkens <mark.broerk...@itemis.de> wrote: > However, if an XML instance makes use of xsi:type within the extension and > the schema definition of the extension is not available, then > the xerces parser reports the following error message: cvc-elt.4.2: Cannot > resolve 'ext2:B-INTEGER' to a type definition for element 'ext2:B'. > If the schema file is available, no errors are reported. > > Did I find a bug or are there any properties which can be set in order to > make xerces ignore the xsi:type?
As far as I know, the presence of xsi:type in an XML instance document would force the XML Schema validator to look for the XSD type referred by xsi:type for validation. If such a type is not found at XML instance validation time by the schema validator, then that would be an error (it's not a validation failure, but a kind of static error) during schema validation assessment. Therefore, I believe that the error generated by Xerces is correct in this case. The XML Schema validation assessment should have access to the type definition, that is referred by xsi:type. I think, Xerces currently has no provision to fallback to another type for validation (for e.g, the declared type in the schema), if a type referred by xsi:type is not found during XML validation assessment. -- Regards, Mukul Gandhi --------------------------------------------------------------------- To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org For additional commands, e-mail: j-users-h...@xerces.apache.org