[xml] Fw: import tag somewhat fixed

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


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
to xmlSchemaImportPtr's instead of an xmlChar* containing the namespace's
schemaLocation. Since the hashtable is not used outside of xmlSchemaImport
the vanilla libxml2-2.6.2 version anyway I don't think I have broken

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
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
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
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-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
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


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