You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 29, 2023. It is now read-only.
From the generated bindings, if you use templateExt instead of template you will be able to generate the xml file. But if you try to read the generated xml with the same binding, an exception will be raised (normal because xml is really invalid).
Bindings have been generated by pyxbgen like this: pyxbgen -u pyxb.xsd -m mybinding
Ok perfect sorry for the mistake !
I confirm you that I use the version v1.2.4 instead of at least 1.2.5.
I did not make the connection with ticket #32.
Thanks and sorry for disturbing.
De : Peter A. Bigot <[email protected]>
Envoyé : vendredi 17 mai 2019 15:13
À : pabigot/pyxb <[email protected]>
Cc : fteule <[email protected]>; Author <[email protected]>
Objet : Re: [pabigot/pyxb] Invalid XML can be generated with extension elements (#115)
This is almost certainly #32 <#32> and you're using an old version of PyXB.
With the current next branch the generation for not_correct.xml includes the necessary tag to identify the content type:
<?xml version="1.0" ?>
<MyRoot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<el1 xsi:type="templateExt">
...
</MyRoot>
The xsi:type tag is missing from the el1 in the output you provided.
Your reproducer (and thank you for providing one) works correctly with the current next version.
Please confirm what PyXB version you're using. If it's not at least 1.2.5 this should be closed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#115?email_source=notifications&email_token=AMDDSPMOTBVHBDI3K4LULDTPV2VO3A5CNFSM4HNUY3YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVUW3HQ#issuecomment-493448606> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AMDDSPKQHFA6UC347RRWZXDPV2VO3ANCNFSM4HNUY3YA> . <https://github.com/notifications/beacon/AMDDSPOKRN32KPC4FDB3FR3PV2VO3A5CNFSM4HNUY3YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVUW3HQ.gif>
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
PyXB can generate an invalid xml file without any error if you use an extended element instead of the base element (see sample in attachment).
In the sample, I have 2 complexTypes, with templateExt an extension of template:
From the generated bindings, if you use templateExt instead of template you will be able to generate the xml file. But if you try to read the generated xml with the same binding, an exception will be raised (normal because xml is really invalid).
Bindings have been generated by pyxbgen like this:
pyxbgen -u pyxb.xsd -m mybinding
BugPyXB.zip
The text was updated successfully, but these errors were encountered: