[pyxb-users] annotations in enumerations
Brought to you by:
pabigot
From: Alessandro P. <apa...@gm...> - 2014-05-27 11:12:40
|
Hi, I'm trying to generate binding for an official italian schema (it's for public administrations electronic invoicing), the problem is that this schema has a lot of enumerations that use obscure codes, in order to have a meaningful binding I would like to use the annotations but they are not present in the bindings. Here is a small extract of the schema: <xs:simpleType name="TipoCassaType"> <xs:restriction base="xs:string"> <xs:length value="4"/> <xs:enumeration value="TC01"> <xs:annotation> <xs:documentation> Cassa nazionale previdenza e assistenza avvocati e procuratori legali </xs:documentation> </xs:annotation> </xs:enumeration> <xs:enumeration value="TC02"> <xs:annotation> <xs:documentation> Cassa previdenza dottori commercialisti </xs:documentation> </xs:annotation> </xs:enumeration> </xs:restriction> </xs:simpleType> The generated bindings do not contain the annotation/documentation: # Atomic simple type: { http://www.fatturapa.gov.it/sdi/fatturapa/v1.0}TipoCassaType class TipoCassaType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): """An atomic simple type.""" _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'TipoCassaType') _XSDLocation = pyxb.utils.utility.Location('/home/ale/public_html/fattura_elettronica/fatturapa_v1.0.xsd', 229, 1) _Documentation = None TipoCassaType._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=TipoCassaType, enum_prefix=None) TipoCassaType.TC01 = TipoCassaType._CF_enumeration.addEnumeration(unicode_value=u'TC01', tag=u'TC01') TipoCassaType.TC02 = TipoCassaType._CF_enumeration.addEnumeration(unicode_value=u'TC02', tag=u'TC02') Is there a way to add annotations to the bindings? -- Alessandro Pasotti w3: www.itopen.it |