[xml] Fw: import tag somewhat fixed



I got asked to make this public on the list to ease further discussion, so
here we go...

Daniel,

I have fixed some part of the "import"-relevant code in xmlschemas.c. 

It is now possible to import XML-schemata and reference types defined
in these via their QNames. It is not backwards compatible insofar that the
schemasImports hashtable of a struct _xmlSchema is now used to store
pointers
to xmlSchemaImportPtr's instead of an xmlChar* containing the namespace's
schemaLocation. Since the hashtable is not used outside of xmlSchemaImport
in
the vanilla libxml2-2.6.2 version anyway I don't think I have broken
something.

Please note that it still isn't possible to lookup element declarations and
such in imported schemata since I couldn't find the corresponding pendants
to
xmlSchemaGetType for elements and didn't want to mess with the
schema-independent code. Although I think that this extension shouldn't be
much of a problem I didn't get the OK by my project leader to invest more
time
in this, so at the moment I can just offer you the work done.

I have tested the code with 'make testall' in the libxml2 root
directory and have diffed the results against the output of a regression
test
of a vanilla libxml2-2.6.2 version.

This tar file includes:
libxml2-2.6.2-import-types-patch   - the patch for xmlschemas.c
regression-test-libxml-2.6.2-orig 
regression-test-libxml-2.6.2-patched - the output of the patched and
                                       unpatched libxml2 versions     of
                                       'make testall'
testImport* - a small example explaining the problem and providing a     
              test case for the new functionality

I don't know if this is enough to be included in the next stable release
which
would make maintainance of code at my side of course more easy. If there is
something missing please let me know so I could try to get more time on
this.

thanks,
Robert









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