Dear BaseX team,
I face a problem with the "validate" module. My impression when using "validate:xsd-info" is the following: (a) if the XSD is supplied as argument - xs:import is NOT resolved (b) if the XSD is inferred from xsi:schemaLocation - xs:import IS resolved
It would be wonderful if imports/includes could be automatically resolved - the "validate" module could then be extremely useful!
Best regards, Hans-Juegen
PS: My experiment:
======================================================
let $docURI := '... a document URI ...' let $xsdURI := '... the corresponding schema URI ...'
let $xsd := doc($xsdURI) let $tns := $xsd/xs:schema/@targetNamespace let $doc1 := doc($docURI) let $doc2 := document { element {node-name($doc1/*)} { attribute xsi:schemaLocation {concat($tns, ' ', $xsdURI)}, $doc1/*/(@*, node()) } } return <results>{ <result1>{validate:xsd-info($doc1, $xsd)}</result1>, <result2>{validate:xsd-info($doc2)}</result2> }</results> ======================================================
=>
<results> <result1>Fatal:src-resolve: Name "communication:ShoppingCartFetchRS" kann nicht als "type definition"-Komponente aufgelöst werden.</result1> <result2/> </results>