I created an entire process for my xquery to read a catalog that is built from multiple catalogs (<nextCatalog/>) so I can find the correct schema to validate my XML topics based on the schema reference (My XML files don't all use the same schemas) <topic xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xml:lang="en-us" class="- topic/topic " xsi:noNamespaceSchemaLocation=" urn:oasis:names:tc:dita:psd:ditabase.xsd:1.3", only to discover that once I have my schema and validate:xsd-info($doc, $xsd), it can't be processed because the main .xsd uses references that also require the catalog:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ditaarch=" http://dita.oasis-open.org/architecture/2005/" elementFormDefault= "qualified" attributeFormDefault="unqualified"> <!-- ================ TOPIC DOMAINS ===================== --> <xs:include schemaLocation=" urn:oasis:names:tc:dita:xsd:abbreviateDomain.xsd:1.3"/> <xs:include schemaLocation= "urn:oasis:names:tc:dita:xsd:deliveryTargetAttDomain.xsd:1.3"/> <xs:include schemaLocation= "urn:oasis:names:tc:dita:xsd:equationDomain.xsd:1.3"/> <xs:include schemaLocation= "urn:oasis:names:tc:dita:xsd:hazardDomain.xsd:1.3"/> <xs:include schemaLocation= "urn:oasis:names:tc:dita:psd:highlightDomain.xsd:1.3"/>
My question is: Is it worth it for me to keep going with my ugly parse/replace + export game or is BaseX going to support validate:xsd-info($doc, $catalog) soon? If so how soon?
Also, any chance we can keep the DOCTYPE and allow the same type of validation with DTDs? Ya, I know, I'm pushing my luck... but I have to ask because some clients cannot move to schemas.