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
I've been trying figure out why an XML doesn't validate against an XSD for a while now. I've tried to minimize the XSD and XML as much as possible while still getting the error. The XML validates against the XSD on the following sites: https://www.freeformatter.com/xml-validator-xsd.html and https://www.liquid-technologies.com/online-xsd-validator which makes me think there might be either some super strange thing I'm overlooking int the XSD or perhaps an issue in erlsom.
no match of right hand side value: {:error, [exception: {:error, {~c"2 - Unexpected event, expected end-tag"}}, stack: [:"p:L1"], received: {:startElement, [], ~c"E_MAIL", [], []}]}
Note, if I remove the second sequence in the choice node or simply swap the two sequences in the choice node, the XML validates.
If there's indeed an issue with Erlsom I'll be happy to try and help resolve it.
Kind regards,
Lars
The text was updated successfully, but these errors were encountered:
larshesel
changed the title
Unexpected end tag
Unexpected event, expected end-tag
Jan 9, 2025
I think that there is indeed a bug. Something seems to go wrong with a choice between 2 sequences. It must be a relatively rare thing... But I think it is valid.
This is a problem with the construction of the "Model" (the translation of the XSD to an internal data structure that describes the structure of the valid XML documents). There could be more problems, if this requires a change to the Model, but I don't anticipate that. If you can work out what needs to be changed that would be great, but the code is fairly complex and also a bit messy, I am afraid.
Hi
I've been trying figure out why an XML doesn't validate against an XSD for a while now. I've tried to minimize the XSD and XML as much as possible while still getting the error. The XML validates against the XSD on the following sites: https://www.freeformatter.com/xml-validator-xsd.html and https://www.liquid-technologies.com/online-xsd-validator which makes me think there might be either some super strange thing I'm overlooking int the XSD or perhaps an issue in erlsom.
To reproduce I use the following XSD:
and the following xml:
The error I get by running:
is
Note, if I remove the second sequence in the choice node or simply swap the two sequences in the choice node, the XML validates.
If there's indeed an issue with Erlsom I'll be happy to try and help resolve it.
Kind regards,
Lars
The text was updated successfully, but these errors were encountered: