On Fri, Apr 18, 2008 at 03:30:00PM -0300, Hannes Hochreiner wrote:
The new schema file is attached and any comments are most welcome (I have applied some formatting to it so that it is easier to read than the SVN version).
Very cool! Thanks a lot for your work! I just happened to have a small C++ app lying around that uses libxml2 for RNG validation. Since you asked for something down those lines, I'll attach it to this mail. I don't know, if it is exactly what you are looking for, but I would think that it is certainly a good starting point.
Thanks for that - all code samples are always valuable.
If you have questions concerning the app or suggestions on how to make it suitable for the needs of the Inkscape build process, feel free to drop me a line.
It actually seems like we can use xmllint to validate the inx files with the rng schema during the build process.
Unfortunately there seems to be a little problem now with the Inkscape XML parser - since the namespace applied to the root element now causes it to prefix all elements with "extension:" (as per xml/repr-io.cpp:443) and no extensions are loaded (as per extension/system.cpp:393).
Hence the question - since we are already including libxml2 with Inkscape why not use it to handle all XML files. I know I am missing something big here but maybe a short info is possible.
It seems that extensions are, anyway, separated enough that parsing of the .inx files could now be done with libxml2 (I should be able to do it). And then to take it a step further, libxml++ comes to mind - since we are moving anyway in the C++ direction. Could this dependency be introduced then? It would need updated config scripts and an addition to the windows libs (I have no clues about osx).
Regards, -- Marcin Floryan http://marcin.floryan.pl/ [GPG Key ID: 0D5581C5]