Some news about the xmlschema component.



First, you may want to check the doctest over there :


http://svn.nuxeo.org/trac/pub/file/z3lab/zope/xmlschema/trunk/README.txt




I did some changes so that it's possible now to register the XML Schema
document via ZCML such as this :




<configure xmlns="http://namespaces.zope.org/zope"&gt;

<XMLSchema

id="sample"

document="src/zope/xmlschema/tests/examples/simple.xsd"

/>

</configure>





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

... zope.xmlschema.set('sample')






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



You will find the dependencies over there :


https://svn.nuxeo.org/trac/pub/file/z3lab/zope/xmlschema/trunk/DEPENDENCIES.txt




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