{"action":"created","issue":{"url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/19","repository_url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs","labels_url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/19/comments","events_url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/19/events","html_url":"https://github.com/KhronosGroup/Vulkan-Docs/issues/19","id":134727167,"number":19,"title":"Xml spec: Converting C text to attributes","user":{"login":"SilverPhoenix99","id":1643022,"avatar_url":"https://avatars.githubusercontent.com/u/1643022?v=3","gravatar_id":"","url":"https://api.github.com/users/SilverPhoenix99","html_url":"https://github.com/SilverPhoenix99","followers_url":"https://api.github.com/users/SilverPhoenix99/followers","following_url":"https://api.github.com/users/SilverPhoenix99/following{/other_user}","gists_url":"https://api.github.com/users/SilverPhoenix99/gists{/gist_id}","starred_url":"https://api.github.com/users/SilverPhoenix99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SilverPhoenix99/subscriptions","organizations_url":"https://api.github.com/users/SilverPhoenix99/orgs","repos_url":"https://api.github.com/users/SilverPhoenix99/repos","events_url":"https://api.github.com/users/SilverPhoenix99/events{/privacy}","received_events_url":"https://api.github.com/users/SilverPhoenix99/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-18T23:17:58Z","updated_at":"2016-02-18T23:26:15Z","closed_at":null,"body":"Hi.\r\n\r\nAre there any plans to make the xml spec less dependent on the C language?\r\n\r\nFor example, for const and/or pointer arguments it would be possible to add a type/parameter `modifier` attribute:\r\n\r\n```xml\r\n<command successcodes=\"VK_SUCCESS\" errorcodes=\"VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY\">\r\n    <proto><type>VkResult</type> <name>vkCreateFence</name></proto>\r\n    <param><type>VkDevice</type> <name>device</name></param>\r\n    <param modifier=\"const\"><type modifier=\"pointer\">VkFenceCreateInfo</type> <name>pCreateInfo</name></param>\r\n    <param modifier=\"const\" optional=\"true\"><type modifier=\"pointer\">VkAllocationCallbacks</type> <name>pAllocator</name></param>\r\n    <param><type modifier=\"pointer\">VkFence</type> <name>pFence</name></param>\r\n</command>\r\n```\r\n\r\nAnd for function pointers, it would be possible to wrap a `command` inside a `type`:\r\n\r\n```xml\r\n<type category=\"funcpointer\">\r\n    <command>\r\n        <proto><type>void</type> <name>PFN_vkInternalAllocationNotification</name></proto>\r\n        <param><type modifier=\"pointer\">void</type> <name>pUserData</name></param>\r\n        <param><type>size_t</type> <name>size</name></param>\r\n        <param><type>VkInternalAllocationType</type> <name>allocationType</name></param>\r\n        <param><type>VkSystemAllocationScope</type> <name>allocationScope</name></param>\r\n    </command>\r\n</type>\r\n```\r\n\r\nThis would be useful to language bindings, since the definitions would be more aligned with xml, instead of text in between elements, and still without loosing the expressiveness of C.\r\n\r\nRelated with https://github.com/KhronosGroup/Vulkan-Docs/issues/10"},"comment":{"url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/comments/185978509","html_url":"https://github.com/KhronosGroup/Vulkan-Docs/issues/19#issuecomment-185978509","issue_url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/19","id":185978509,"user":{"login":"SilverPhoenix99","id":1643022,"avatar_url":"https://avatars.githubusercontent.com/u/1643022?v=3","gravatar_id":"","url":"https://api.github.com/users/SilverPhoenix99","html_url":"https://github.com/SilverPhoenix99","followers_url":"https://api.github.com/users/SilverPhoenix99/followers","following_url":"https://api.github.com/users/SilverPhoenix99/following{/other_user}","gists_url":"https://api.github.com/users/SilverPhoenix99/gists{/gist_id}","starred_url":"https://api.github.com/users/SilverPhoenix99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SilverPhoenix99/subscriptions","organizations_url":"https://api.github.com/users/SilverPhoenix99/orgs","repos_url":"https://api.github.com/users/SilverPhoenix99/repos","events_url":"https://api.github.com/users/SilverPhoenix99/events{/privacy}","received_events_url":"https://api.github.com/users/SilverPhoenix99/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T23:26:15Z","updated_at":"2016-02-18T23:26:15Z","body":"Answer related with https://github.com/KhronosGroup/Vulkan-Docs/issues/6\r\n\r\nSo I need to clarify: The intent is not to have a language agnostic Xml, but to define most common cases (const and pointer) as attributes. Things that are more intrinsic to C, like #define are more complex to define as xml and I'm disregarding those cases."}}