{"action":"created","issue":{"url":"https://api.github.com/repos/renggli/dart-xml/issues/12","labels_url":"https://api.github.com/repos/renggli/dart-xml/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/renggli/dart-xml/issues/12/comments","events_url":"https://api.github.com/repos/renggli/dart-xml/issues/12/events","html_url":"https://github.com/renggli/dart-xml/pull/12","id":62988163,"number":12,"title":"Enhancement for namespace manangement","user":{"login":"stevenroose","id":853468,"avatar_url":"https://avatars.githubusercontent.com/u/853468?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenroose","html_url":"https://github.com/stevenroose","followers_url":"https://api.github.com/users/stevenroose/followers","following_url":"https://api.github.com/users/stevenroose/following{/other_user}","gists_url":"https://api.github.com/users/stevenroose/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenroose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenroose/subscriptions","organizations_url":"https://api.github.com/users/stevenroose/orgs","repos_url":"https://api.github.com/users/stevenroose/repos","events_url":"https://api.github.com/users/stevenroose/events{/privacy}","received_events_url":"https://api.github.com/users/stevenroose/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-19T13:33:42Z","updated_at":"2015-03-19T19:55:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/renggli/dart-xml/pulls/12","html_url":"https://github.com/renggli/dart-xml/pull/12","diff_url":"https://github.com/renggli/dart-xml/pull/12.diff","patch_url":"https://github.com/renggli/dart-xml/pull/12.patch"},"body":"Implemented: \r\n - Allow omission of unused namespaces\r\n - Prevent duplicate namespace definition\r\n\r\nYet to be determined:\r\nHow to have users opt-in and opt-out for the change.\r\n\r\nI made sure all checks happen in the relevant methods. So:\r\n\r\n - Omitting unused namespaces happens in the `element` method.\r\n - Preventing duplicate namespace definitions happens in the `namespace` method.\r\n\r\nIf I could chose, I'd add a boolean parameter to both the `namespace` and the `element` method, but I dislike random boolean parameters, so I would opt for named parameters. However, the `namespace` method already has an optional parameter, so a named parameter cannot be introduced without making a breaking change.\r\n\r\nAnother option is to add options to the `XmlBuilder` constructor...\r\n"},"comment":{"url":"https://api.github.com/repos/renggli/dart-xml/issues/comments/83738773","html_url":"https://github.com/renggli/dart-xml/pull/12#issuecomment-83738773","issue_url":"https://api.github.com/repos/renggli/dart-xml/issues/12","id":83738773,"user":{"login":"renggli","id":131610,"avatar_url":"https://avatars.githubusercontent.com/u/131610?v=3","gravatar_id":"","url":"https://api.github.com/users/renggli","html_url":"https://github.com/renggli","followers_url":"https://api.github.com/users/renggli/followers","following_url":"https://api.github.com/users/renggli/following{/other_user}","gists_url":"https://api.github.com/users/renggli/gists{/gist_id}","starred_url":"https://api.github.com/users/renggli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renggli/subscriptions","organizations_url":"https://api.github.com/users/renggli/orgs","repos_url":"https://api.github.com/users/renggli/repos","events_url":"https://api.github.com/users/renggli/events{/privacy}","received_events_url":"https://api.github.com/users/renggli/received_events","type":"User","site_admin":false},"created_at":"2015-03-19T19:55:51Z","updated_at":"2015-03-19T19:55:51Z","body":"Yes, every line and every functionality should be covered by unit tests (https://github.com/renggli/dart-xml/blob/master/test/xml_test.dart#L760). Also I suspect there is a bug in your code: Using namespaces on elements does not seem to mark them as used?"}}