Dear BaseX people,
using function 'validate:xsd-report' I notice a surprising behaviour:
- if supplying the XSD via URI, it works as expected
- if supplying the XSD as node, the imports cannot be resolved
Is this a known behaviour and intended?
In case it is not, see PS for simple code reproducing the behaviour.
Kind regards,
Hans-Jürgen
PS:
(1) doc.xml
<doc b:att="99" xmlns:b="http://basex.org"/>
(2) schema1.xsd
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:b="http://basex.org" elementFormDefault="qualified">
<xs:import namespace="http://basex.org" schemaLocation="schema2.xsd"/>
<xs:element name="doc">
<xs:complexType>
<xs:attribute ref="b:att"/>
</xs:complexType>
</xs:element>
</xs:schema>
(3) schema2.xsd
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://basex.org" elementFormDefault="qualified">
<xs:attribute name="att" type="xs:integer"/>
</xs:schema>
(4) validate.xq
validate:xsd-report('doc.xml', 'schema1.xsd'),
'===',
validate:xsd-report('doc.xml', doc('schema1.xsd'))