{"action":"opened","issue":{"url":"https://api.github.com/repos/SonyWWS/ATF/issues/60","repository_url":"https://api.github.com/repos/SonyWWS/ATF","labels_url":"https://api.github.com/repos/SonyWWS/ATF/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/SonyWWS/ATF/issues/60/comments","events_url":"https://api.github.com/repos/SonyWWS/ATF/issues/60/events","html_url":"https://github.com/SonyWWS/ATF/issues/60","id":175199343,"number":60,"title":"element minOccurs and maxOccurs are ignored by ","user":{"login":"JelleVM","id":8382862,"avatar_url":"https://avatars.githubusercontent.com/u/8382862?v=3","gravatar_id":"","url":"https://api.github.com/users/JelleVM","html_url":"https://github.com/JelleVM","followers_url":"https://api.github.com/users/JelleVM/followers","following_url":"https://api.github.com/users/JelleVM/following{/other_user}","gists_url":"https://api.github.com/users/JelleVM/gists{/gist_id}","starred_url":"https://api.github.com/users/JelleVM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JelleVM/subscriptions","organizations_url":"https://api.github.com/users/JelleVM/orgs","repos_url":"https://api.github.com/users/JelleVM/repos","events_url":"https://api.github.com/users/JelleVM/events{/privacy}","received_events_url":"https://api.github.com/users/JelleVM/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-06T09:20:39Z","updated_at":"2016-09-06T09:20:39Z","closed_at":null,"body":"Consider the scenario where a third party XML file is read (using XmlSchemaLoader.cs) according to some XSD file that has been generated turned into a DOM structure. The AttributeInfo constructed for the elements will be of type `XmlAttributeInfo`. Some of these elements may have a minOccurs/maxOccurs set on them. This information is not preserved (i.e. it is for ChildNodes but not for elements).\r\nWhen writing this XML again (using DomXmlWriter), this then results in problems where element nodes may not be written even though minOccurs was 1.\r\n\r\nI think there are two potential fixes: either add these two properties to the `XmlAttributeInfo` class, or adding an AttributeCountRule and adding this to the info, in much the same way as there is the ChildCountRule. And then in DomXmlWriter.ShouldWriteAttribute check if minOccurs greater than 1.\r\n\r\nThanks!\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"JelleVM"}}