[xsd-users] Ignoring unknown elements

Vladimir Zykov vladimir.zykov at ncloudtech.ru
Thu Oct 16 07:49:08 EDT 2014


Boris,

I see your point. See my comments inline.

>> In order to achieve this we are ready to rewrite our XSD schema files (we do this
>> anyway for ODF) and remove from them things that we don't currently support so
>> that what was in the specification will become unknown content to the generated
>> code. 
> 
>> We also remove any derivation (by extension or by restriction) for all
>> complex types with complex content (i.e. we copy content from base type
>> to the derived type).
> 
> This could very well be the reason why you end up with huge libraries.
> You are essentially duplicating the same code over and over again
> instead of simply reusing the base classes.

It could be but we don't use it yet, we just considering such a change. For now
we use original schemas with type derivations. What I wanted to state is that
amount of generated/compiled code is big because schemas are very big.
Why we think changing schema will reduce amount of code is because we support
a small portion of the original schema. This might change someday but for now
we better remove non-supported types/elements.

>> Code generation in this case should fail, I think.
> 
> Yes, this will work for your very unique case. What about someone else
> who also has derivation? They could reasonably expect to be able to
> specify individual types that should have content ignored. The point
> I am trying to make is that we don't add features that are only usable
> by a single user.

That's fine. If you think that very few users will need it we can do this
ourselves. The only thing that is unclear for me now is how to publish our
changes as demanded by GNU license (XSD is only project with GNU license that
we use). But this is a minor problem.

Anyway, thanks for taking a look.

Vladimir Zykov
Software Engineer
New Cloud Technologies, LLC





More information about the xsd-users mailing list