#27 fix attributes in derivation by restriction

PyXB 0.5.2
Binding model

The content model is such that restricting elements just works (though the accessors for the inaccessible ones probably should be hidden). Parent type attributes, on the other hand, are overridden when they should be inherited.


  • Peter A. Bigot

    Peter A. Bigot - 2009-07-16
    • status changed from new to accepted
    • milestone changed from PyXB 0.5.1 to PyXB 0.5.2

    Delayed to next beta.

  • Peter A. Bigot

    Peter A. Bigot - 2009-07-26
    • status changed from accepted to closed
    • resolution set to fixed

    Fixed in [1584]. Turns out I also misunderstood restriction of attributes: unlike elements (which must be explicitly listed if they are to be present in the restriction), unlisted attributes are inherited from the base class, unless they are redefined. They are "removed" by being redefined with use="prohibited". (PyXB did this, excepting this DR, but I thought it was wrong to do so: it's not.)

    PyXB now re-uses the map from the parent use when initializing the restricted AttributeUse instance.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks