xs:list element type mismatch
Brought to you by:
dkuhlman
When accessing members of xs:list
type element, memers are type of string
instead of their real type defined in .xsd
, for instance xs:integer
. Things change when new value is being set.
For instance:
print(f'nr before assignment: {xml_ds.nr}')
nr list before assignment: ['1', '2', '3', '4', '5', '6']
xml_ds.nr_list = [1, 2, 3, 4, 5, 6]
print(f'nr list after assignment: {xml_ds.nr_list}')
nr list after assignment: [1, 2, 3, 4, 5, 6]
I attached example program.
Just run run.sh
Thank you for your report.
However, I do not know what to do about this.
You may be right in suggesting that the behavior should be different.
Do you want to submit a patch?
If so I'll consider it.
But, I do not want to make a change that I do not understand.
Maybe you could explain in detail how you think it should function.
Or maybe tell me how the current behavior is a problem for you.
Is there some behavior that you need and cannot get in
main.py
?I'll welcome suggestions.