<xs:schema id="schema-images" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:include schemaLocation="HowToContent_Common.xsd"/>
...
</xs:element>
</xs:schema>Does not pickup the definitions in the common .xsd files when running validate:xsd. It returns errors for items defined in the 'included' .xsd.
Referencing a 'sub-DTD' does work with the DTD (validate:dtd) when the common element is included using a similar path.
<!ENTITY % commonPUBLIC "-//MOTOROLA//DTD HOW2 COMMON//EN"
"HowToContent_Common.mod">
%common;
How do I get validate:xsd to grab the sub-components? I'm currently using validate:xsd like this:
let $xsd := db:open('AppResources')/*[@id=$xsd-id]
try {
validate:xsd($xml-file, $xsd)
} catch * {
<li style="color:red;"><p>File '{$xml-file/base-uri()}' doesn't validate against the '{$xsd/base-uri()}' schema.</p><p>{'Error [' || $err:code || ']: ' || $err:description}</p></li>
}
My files validate correctly when I run validation in XML Oxygen, so I know the XSD itself is working.
I tried using lower caps in the xs:include reference as I noticed that the .xsd files get renamed to lower caps on import (but not DTDs [because they were considered raw and unindexed?]). Anyhow, it didn't help.
Regards,
France--
France Baril
Architecte documentaire / Documentation architect
france.baril@architextus.com
(514) 572-0341
_______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk