{"action":"opened","issue":{"url":"https://api.github.com/repos/owlcs/owlapi/issues/511","repository_url":"https://api.github.com/repos/owlcs/owlapi","labels_url":"https://api.github.com/repos/owlcs/owlapi/issues/511/labels{/name}","comments_url":"https://api.github.com/repos/owlcs/owlapi/issues/511/comments","events_url":"https://api.github.com/repos/owlcs/owlapi/issues/511/events","html_url":"https://github.com/owlcs/owlapi/issues/511","id":146977299,"number":511,"title":"Weird behaviour with serialization of annotations with custom datatypes","user":{"login":"vincentvialard","id":16098519,"avatar_url":"https://avatars.githubusercontent.com/u/16098519?v=3","gravatar_id":"","url":"https://api.github.com/users/vincentvialard","html_url":"https://github.com/vincentvialard","followers_url":"https://api.github.com/users/vincentvialard/followers","following_url":"https://api.github.com/users/vincentvialard/following{/other_user}","gists_url":"https://api.github.com/users/vincentvialard/gists{/gist_id}","starred_url":"https://api.github.com/users/vincentvialard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincentvialard/subscriptions","organizations_url":"https://api.github.com/users/vincentvialard/orgs","repos_url":"https://api.github.com/users/vincentvialard/repos","events_url":"https://api.github.com/users/vincentvialard/events{/privacy}","received_events_url":"https://api.github.com/users/vincentvialard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-08T16:35:45Z","updated_at":"2016-04-08T16:35:45Z","closed_at":null,"body":"Hi there,\r\n\r\nI stumbled upon a weird behaviour while trying to extract annotations of ontologies that use custom datatypes for the litterals of the annotations. \r\n\r\nI collect the annotation assertions of an ontology, create a new ontology with the collected axioms and save it. Declarations for the custom datatypes are automatically added, except if they are annotated. \r\n\r\nI suppose it's because if they are not annotated, the serializer does not know them, and he adds a declaration when he finds them as type of the litterals. But the OWL-XML serializer adds the declaration even for the annotated datatypes. \r\n\r\nI don't know what's right here, and it's not really a problem for my usage. But it feels weird and might be the sign something is wrong under the hood.\r\n\r\nA minimal test is attached to this post.\r\n\r\nBest,\r\n[Archiv.zip](https://github.com/owlcs/owlapi/files/210522/Archiv.zip)\r\n\r\n\r\nVincent."}}