Dear Dave,
I am experiencing the following issue:
I try to generate the structure with an element
<xs:element name="country" type="xs:token" minOccurs="0"/>
with a facet:
whiteSpace="collapse"
This results in the following Python code in "buildChildren":
elif nodeName_ == 'country':
country_ = child_.text
country_ = re_.sub(String_cleanup_pat_, " ", country_).strip()
country_ = self.gds_validate_string(country_, node, 'country')
self.country = country_
When the element "country" is empty in the XML file that is being
processed with parseString from the generated Python module, it fails on
the regex substitution line.
This works fine if I use "xs:string" with whiteSpace="preserve", in
which case the regex line is not generated.
Please could you tell if this is an intended behaviour in case if
minOccurs="0" is specified?
Thank you and best regards,
Andrii
------------------------------------------------------------------------------
_______________________________________________
generateds-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/generateds-users