[xml] Working with base schema definitions



Hi,

I am using libxml2 in C++. I have 2 xsd files with one defining some
types in a target namespace and the other using them. I have those
files as a list of text/string objects. Hence, those documents don't
provide xs:import and schemaLocation attribute for it (most probably
because owner of those XSDs don't want to create a file system
dependency.

xmlSchemaValidateDoc() hence fails to validate the document with an
error that a type from base schema is missing and rightly so because
the API only takes a single schema file's validation context as the
first argunent.

Any ideas how I can provide 2 schema files to libxml2 without explicit
dependencies such that it is able to find types in respective
namespaces from base schema document. Or if not then if there is any
other way to achieve this? Btw, xerces-c++ was able to handle this
successfully.

Thanks and regards,
Abhishek Padmanabh



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]