Re: [xml] Working with base schema definitions

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.


xml-request gnome org wrote:
Date: Tue, 5 Jun 2012 12:53:14 +0530
From: Abhishek padmanabh <abhishek padmanabh gmail com>
To: xml gnome org
Subject: [xml] Working with base schema definitions
      <CAADzxVAYVt8PQ3ZjePOsCBhPvCy+J-BNgqYH7MD4HYr0E=rMiQ mail gmail com>
Content-Type: text/plain; charset=ISO-8859-1


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

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

Thanks and regards,
Abhishek Padmanabh


xml mailing list
xml gnome org

End of xml Digest, Vol 98, Issue 3


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

Attachment: wolfgang_laun.vcf
Description: wolfgang_laun.vcf

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