[lxml-dev] objectify type annotation based on an XML Schema

Stefan Behnel stefan_ml at behnel.de
Wed Jan 23 14:12:24 CET 2008


Hi,

jholg at gmx.de wrote:
>> - Is there a way to specify the xsi:type in a schema sheet ? This
>> question may sound stupid, but I'm still learning the XSD spec, and I
>> wonder if objectify could rely entirely on the schema, without the need
>> to add anything in the XML document itself.
> For now, there is nothing like a "typifier" that takes an instance and a 
> schema and adds type information from the schema to the instance document.

Someone should file a "wishlist" bug report on this, as it has been requested
a couple of times.

There would be ways to approach this. One is the "generateDS" tool by Dave
Kuhlman:

http://www.rexx.com/~dkuhlman/generateDS.html

we could try to extract the parser (or reimplement it with lxml) and run an
annotation instead of the class generation step.

We could also look a bit deeper into the internal handling of XML schema in
libxml2, there could be something to start from.

Stefan


More information about the lxml-dev mailing list