[xml] support for xml schema in libxml2

Hi XML-Team,
  currently I am dealing with XML in order to check if it
could be used as representation for testdata used as input for
regression tests within a CAD-software development environment.
For this reason I have the libxml2 libraries available on Windows.
This is libxml2-2.6.22.win32 (and the matching additional libs).
Later we will need them for
SUN, HP, SGI, IBM and Linux as well.

These are my first experiences with XML.
My theory reference is "XML in a Nutshell" by Harold/Means.

Now I am on the point that I think it would be nice to setup
any development on the base of XML Schema.

Studying the documentation (coming with the libxml2 download) I
found that it is not quite clear in which way libxml2 supports
XML schema. The following are some problems I found during evaluation.
May be some of these problems result from my lacking experience
with XML. If you have some comments or if you think that some of the
statements below are wrong, I would like you to give me a reply.

With respect to xmllint:

(1) xmllint supports schema validation, but it may have problems.
   --> Importing the x3d extensions of www.web3d.org via "x3d-3.0.xsd"
       it seems that
       xmllint does a validation for this schema but afterwards
       the xml file will always be ignored
(2) the xs:ID type seems not to be checked, multiple occurences of the
   same xs:ID are not indicated

With respect to the programming interface (I know that the interface is
incomplete as stated within the documentation):

(1) Here we have the same behaviour as xmllint.
(2) The xmlTextReader is a suitable interface for me, but it does not
   support schema files.
   --> For example default attributes will not be inserted
   --> Fixed attributes will not be set
I came to the conclusion that it currently makes no sense to
do some implementation based on XML schema within libxml2. Is this correct?
If you see a way to do some development, I would ask you to send me some
example code or some hints where to find example code for
"how to read xml files based on xml schema" using libxml2.
What are the future intentions with respect to  XML schema support?

By the way, the DTD based functionality works fine.

Thanks in advance and best regards
Manfred Rahmig

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