-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lack of mandatory IDs on elements #4
Comments
The following entities has an ID property attached to them:
Given the xsd the following class was generated (for c#):
So each id property has both an value property and a type property which should hopefully be enough to allow you to attach the id required to specific entities. @hansonwj Can you please review the list and see if anything entity is missing the requested id (array)? In c# you should be able to write an extention method to extract the ID in a clean way... |
Hi @nzmangan apologies for not being clearer. My issue is not that the Id elements don't exist in the spec, but that it is not mandatory to provide an Id in most cases. For example, in the Person element [IOF.xsd:458], the minOccurs for the Id element is set at 0 <xsd:element name="Id" type="Id" minOccurs="0" maxOccurs="unbounded"> In this scenario, if no Id is provided, you would have to use the Name and other keys to identify the Person. If I remember correctly, I was trying to detect new PersonResult elements in live results, but the originating system did not provide a unique identifier for each PersonResult element, meaning I had to check the Id of the Person within the PersonResult instead. Not the end of the world, but also not ideal. There must be valid reasons why Id elements are not mandatory in the spec, but I think it is worth considering if some of the elements should have mandatory Ids. Please correct me if I have misunderstood the spec. |
I am struggling to see what difference it would make the minimum value 1 as it would still be down to each software to implement such feature. I would not be surprised if 0% of the applications out there is not validating the generated xml against the xsd, so even if we do change this I am not sure how many application would enforce such change. I guess in theory you can argue that you can tell the developers that they do not conform to the standard but I am not sure what leverage you would have. There is plenty of software used that are not dealing well with missing xml element / null values. I do agree with what you are trying to achieve and yes IOF should probably ensure the specs are showing best practice if IOF values your proposal. |
It would be useful if the spec included a mandatory guid on each element, to help with maintaining data between systems.
The text was updated successfully, but these errors were encountered: