xs:key and xs:keyref schema tags.

I have a question concerning XML Schema features which are apparently not supported by XML Data Binder namely: xs:key and xs:keyref schema tags.
Are there any plans to use this features at least for validation during unmarshalling from XML.

You are correct, these are not supported. I think this is the only major feature we lack. We have looked at this but it is difficult to achieve as you are dependent on the XPath (and position in schema) to decide in what context the item is unique.

Simple Example - a book may have a unique key constraint on the ISBN attribute when in a library, but not when in a manufacturers stock. So in C++ terms it is the containing parent collection that requires the constraint.
We could validate the constraint when writing out to XML, but we would have to load the data back into a DOM (slow) rather than just use our fast xml writer classes.

Add Feedback