Some news about the xmlschema component.
First, you may want to check the doctest over there :
I did some changes so that it's possible now to register the XML Schema
document via ZCML such as this :
Then the directive register a named utility within the global utility
registy of Zope3 that will be used by the dedicated XSD handler.
Now, to use it from you class def you just need to give the id (name) of
the registred schema such as :
>>> import zope.interface
>>> import zope.xmlschema
>>> class IFoo(zope.interface.Interface):
A new feature as well the validation : the handler perform an XML Schema
validation against the XMLSchema.xsd from the w3c.
If you want to test this package (or help right :)) be sure to check the
deps. (especially, the CVS HEAD of libxml2 is required for the XML Schema
You will find the dependencies over there :
Now time to print the XML Schema specifications and code field mappers for
the zope interface.
Thanks to Kasimier Buchcik for the pointer on the libxml2 CVS for the
XML Schema validation.
Time to sleep now :)
(Post originally written by Julien Anguenot on the old Nuxeo blogs.)