willemdj / erlsom

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

handling of attributegroup and extensions #58

Closed mdemars closed 8 years ago

mdemars commented 8 years ago

Hi,

I'm encountering an error "Unexpected attribute" when using a schema which contains a combination of attributeGroup and extensions.

I have committed a failing test-case to illustrate this here: https://github.com/mdemars/erlsom/commit/b1619531339d75f0eb78c2d7ef86e759e78acd4d

Also, the .xml and .xsd files are attached.

NOTE: this is an extract of a larger schema, but I think this represents the issue properly.

comxerv.zip

filmor commented 8 years ago

The issue occurs when using a schema that has a type A deriving from B deriving from C where each of B and C has an attribute group. In that case, only the first-derived attribute group (i.e. the one of B) is considered in the model.

willemdj commented 8 years ago

(Sorry for being so slow to respond).

I'll look into it. If it is still an issue for you at this moment, it would probably be easy to work around this problem (for now) by making some small changes to the XSD to avoid the problem that @filmor describes.

willemdj commented 8 years ago

Found the bug. It should work now.