it seems to me the built-in processor has a bug concerning filtered expressions. The following query yields warnings of type 'include' and 'import' even if no xs:include or xs:import is present in the respective xsd. Saxon and Data Direct, on the other hand, produce the expected results.
With kind regards -
Hans-Juergen Rennau
Query:
declare namespace xs="http://www.w3.org/2001/XMLSchema";
declare variable $xsdfile as xs:string external;
declare variable $xsd := doc($xsdfile)/*;
<schemaReport>{
$xsd[not(@version)]/<warning ty="version">No version</warning>,
$xsd[not(@targetNamespace)]/<warning ty="tns">No tns</warning>,
$xsd[xs:include]/<warning ty="include">With includes</warning>,
$xsd[xs:import]/<warning ty="import">With imports</warning>,
<elemDeclarations>{
for $e in $xsd/xs:element/@name order by $e
return element {$e}{()}
}</elemDeclarations>
}</schemaReport>