Peter A. Bigot - 2010-11-04
  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from PyXB 1.1.2 to PyXB 1.1.3

Fixed in 8f72733. The change is small, but a new conceptual distinction may cause problems.

Establish distinction between lexical and value construction.

Up to now, all constructor arguments where conversion was required passed
through whitespace normalization. In fact, this should only be done when
the parameter originates from XML text. Lord knows why this worked at all,
but apparently n the past this didn't matter because we needed to convert to
the native Python type, but now we have to support XML types (xs:hexBinary)
where the lexical and value representations cannot be distinguished by type.

With this patch, whitespace normalization is no longer performed unless it
is known that the parameter originated from XML text. In particular,
invoking xs.ID(s) in Python will not normalize s; it must already conform to
constraints involving whitespace.

All operations that involve construction should now consult the _from_xml
keyword to determine the origin of the input.