willemdj / erlsom

XML parser for Erlang
GNU Lesser General Public License v3.0
264 stars 103 forks source link

Missing element before end-tag #4

Closed arcusfelis closed 13 years ago

arcusfelis commented 13 years ago

I have an problem with erlsom:scan(BinXml, Model):

\ exception error: no match of right hand side value {error,[{exception,{error,"Missing element before end-tag: collation"}}, {stack,[collation,'collations/SEQ1',collations,'ldml/SEQ1', ldml]}, {received,{endElement,[],"collation",[]}}]}

minOccurs, maxOccurs have wrong values in a model. minOccurs, maxOccurs are "0" and "undefined" in xsd, but they are "1" and "1" in a model.

XML: https://gist.github.com/1171290

XSD: https://gist.github.com/1171271

Model: https://gist.github.com/1171281

willemdj commented 13 years ago

I'll have a look (but probably not in the next few days).

It would be helpfull to have a complete (self contained, preferably minimal...) XSD that triggers this error. Could you provide something like that? You can send it to me directly if you prefer (you can find my email address in the source code).

arcusfelis commented 13 years ago

This xsd was converted from dtd throw trang. It's size is 200Kb, so I try to shrink it.

arcusfelis commented 13 years ago

I collected minimal test data.

Bad xsd: https://gist.github.com/1172890

Good xsd: https://gist.github.com/1172893

xml: https://gist.github.com/1172894

error: https://gist.github.com/1172897

willemdj commented 13 years ago

Ok, thanks.

On Fri, Aug 26, 2011 at 9:23 AM, freeakk < reply@reply.github.com>wrote:

I collected minimal test data.

Bad xsd: https://gist.github.com/1172890

Good xsd: https://gist.github.com/1172893

xml: https://gist.github.com/1172894

error: https://gist.github.com/1172897

Reply to this email directly or view it on GitHub: https://github.com/willemdj/erlsom/issues/4#issuecomment-1910536