At this time, no. PyXB provides documentation annotations as Python doc strings, but those can only be attached to Python classes. Enumeration constants are simply instances of the underlying type, with no place to attach the documentation string.
Peter On Tue, May 27, 2014 at 6:12 AM, Alessandro Pasotti <apaso...@gmail.com> wrote: > 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 > > ------------------------------------------------------------------------------ > The best possible search technologies are now affordable for all companies. > Download your FREE open source Enterprise Search Engine today! > Our experts will assist you in its installation for $59/mo, no commitment. > Test it for FREE on our Cloud platform anytime! > http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk > _______________________________________________ > pyxb-users mailing list > pyxb-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pyxb-users > ------------------------------------------------------------------------------ The best possible search technologies are now affordable for all companies. Download your FREE open source Enterprise Search Engine today! Our experts will assist you in its installation for $59/mo, no commitment. Test it for FREE on our Cloud platform anytime! http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk _______________________________________________ pyxb-users mailing list pyxb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyxb-users