#68 consider stubbing values for complex type elements

PyXB 2.0.0
accepted
None
Binding model
minor
PyXB 1.1.0
enhancement
2010-01-28
2009-12-22
Peter A. Bigot
No

If a complex type with sequence content contains an element with complex type content and minOccurs=maxOccurs=1, it would be convenient if the constructor populated that field with a default-constructed instance of the corresponding type, just as it does for such elements with simple type content or when maxOccurs is greater than one.

If this were done, then certain cases with anonymous complex types are simplified, eliminating the need for the initialization of rv.structures in:

  rv.structures = pyxb.BIND()
  for s in structs:
    rv.structures.structure.append(structure(s))

Discussion

  • Peter A. Bigot
    Peter A. Bigot
    2010-01-28

    • status changed from new to accepted
    • milestone changed from PyXB 1.1.1 to PyXB 2.0.0