Menu

#33 simpleType validation does not report a warning

1.0
open
nobody
None
2022-06-24
2022-06-24
No

Hello,

I met a case when validation can't figure out incorrect value of simpleType. It seems like some generated classes are not initialized with gds_collector_ instance.

I fixed that in generated code by adding gds_collector_=gds_collector_ to super() call of _buildChilder method:
super(Child1Info, self)._buildChildren(child_, node, nodeName_, True, gds_collector_=gds_collector_)

After that I get a warning:
Warning: Value "abc" near line 6 does not match xsd enumeration restriction on OpInfo

The way I run generateDS is: generateDS --always-export-default --export="write validate" -f -o validation_bug.py validation_bug.xsd. The generateDS version is 2.40.13.

Attaching XSD and XML files for easier reproduction purposes.

2 Attachments

Discussion


Log in to post a comment.