@@ -634,7 +634,7 @@ def _is_simple(elem: etree._Element) -> bool:
634634 for child in elem :
635635 child_type = _normalized_name (child .tag )
636636
637- if child_type in ['attribute' , 'simpleContent' ]:
637+ if child_type in ['attribute' , 'simpleContent' , 'annotation' ]:
638638 continue
639639 if child_type in ['element' , 'sequence' , 'choice' , 'all' ]:
640640 simple = False
@@ -842,7 +842,7 @@ def _get_sequence_order(xmlschema_evaluator: etree.XPathDocumentEvaluator, seque
842842 new_order = _get_sequence_order (xmlschema_evaluator , group [0 ])
843843 for elem in new_order :
844844 elem_order .append (elem )
845- elif child_type in ['attribute' , 'simpleContent' , 'all' ]:
845+ elif child_type in ['attribute' , 'simpleContent' , 'all' , 'annotation' ]:
846846 continue
847847 else :
848848 raise KeyError (f'Dont know what to do with { child_type } ' )
@@ -874,7 +874,7 @@ def _get_valid_tags(xmlschema_evaluator: etree.XPathDocumentEvaluator, sequence_
874874 new_elems = _get_valid_tags (xmlschema_evaluator , group [0 ])
875875 for elem in new_elems :
876876 elems .append (elem )
877- elif child_type in ['attribute' , 'simpleContent' ]:
877+ elif child_type in ['attribute' , 'simpleContent' , 'annotation' ]:
878878 continue
879879 else :
880880 raise KeyError (f'Dont know what to do with { child_type } ' )
0 commit comments