Hi all, I have two questions regarding XSD validation,
1. resolving paths while using imported XSDs 2. error reporting
1. resolving paths while using imported XSDs
consider this example
let $doc := <a /> let $schema := doc("../xsd/XDW.xsd") return validate:xsd($doc,$schema)
this returns an error "[BXVA0001] Validation failed: src-resolve: Cannot resolve the name 'cda:NullFlavor' to a(n) 'type definition' component.". This is because the XDW.xsd schema imports two more XSD's with the following import statements that uses relative paths to refer to schemas that reside in the same folder as the root XDW.xsd.
<xs:import namespace="http://docs.oasis-open.org/ns/bpel4people/ws-humantask/types/200803" schemaLocation="ws-humantask-types.xsd"/> <xs:import namespace="urn:hl7-org:v3" schemaLocation="HW_POCD_MT000040.xsd"/>
The problem occurs with both file and http based uris. The only way I have to make validations through imported schemas to work is by using absolute paths in the import statements which is very annoying/limiting especially when handling multiple deployments. I just wanted to know whether this is the expected behaviour in which case it'll require us to take countermeasures at application deployment level.
2. Error reporting
Basex reports the first error while validating with xsd schema, while java uses to report the collection of errors that do not depend on each other. This latter beaviour allos a user to correct multiple bugs simultaneously befor redoing the validation. I understand that the choice to return an exception on validation failure complicates this but couldn't it be possible to return a more complex description of the validation result containing multiple error marks?
For information, we use Basex 7.5 on Ubuntu 12.04.
Thanks in advance, Seenivasan