You can write a third schema file that
   - imports the schema file with the type definition
   - includes the schema file using them (for other definitions)
and run whatever against this new "top level" file.

-W

xml-requ...@gnome.org wrote:
> Date: Tue, 5 Jun 2012 12:53:14 +0530
> From: Abhishek padmanabh <abhishek.padman...@gmail.com>
> To: xml@gnome.org
> Subject: [xml] Working with base schema definitions
> Message-ID:
>       <CAADzxVAYVt8PQ3ZjePOsCBhPvCy+J-BNgqYH7MD4HYr0E=r...@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> 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
>
>
> ------------------------------
>
> _______________________________________________
> xml mailing list
> xml@gnome.org
> https://mail.gnome.org/mailman/listinfo/xml
>
>
> End of xml Digest, Vol 98, Issue 3
> **********************************
>   

-- 

wolfgang.l...@thalesgroup.com - Software Technology
Thales Austria GmbH                      voice: +43 (0) 1 27711-5662
Scheydgasse 41                           fax:   +43 (0) 1 27711-1173
1210 Vienna, Austria                     http://www.thalesgroup.com
    (FN 278233 t - Handelsgericht Wien/Commercial Court Vienna)

<<attachment: wolfgang_laun.vcf>>

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml

Reply via email to