{"id":20,"date":"2007-05-17T20:54:12","date_gmt":"2007-05-17T18:54:12","guid":{"rendered":"http:\/\/www.lightrock.biz\/index.php\/?p=17"},"modified":"2011-05-27T21:22:15","modified_gmt":"2011-05-27T19:22:15","slug":"xml-for-engineering","status":"publish","type":"post","link":"https:\/\/lightrocker.lightrock.biz\/?p=20","title":{"rendered":"XML for engineering"},"content":{"rendered":"<p>The <a href=\"http:\/\/en.wikipedia.org\/wiki\/Xml\" target=\"_blank\">Extensible Markup Language (XML)<\/a> can be used to store any given data. I am using it to design functions, interfaces, classes and other types for the second TigerHeart engine.<\/p>\n<p>Besides pure XML files, which store names, parameters, result types, derivations and so on, there are also a schema (XSD) and transformation files (XSLT).<br \/>\nThe first one defines basic types and valid elements, attributes, groups and sequences for the XML files. So their syntax is checked for mistakes. Both kind of files are free from programming language specifications like <strong><em>class<\/em><\/strong> or <strong><em>virtual<\/em><\/strong> for <a href=\"http:\/\/en.wikipedia.org\/wiki\/C%2B%2B\" target=\"_blank\">C++<\/a>.<br \/>\nFor that XSLT is available to assemble files that are usable for coding. The greatest benefit of the whole system is the convertibility of the XML files into various languages and even multiple files of the same language (e.g. .h[pp] and .c[pp] for C). It is also possible to automatically generate bindings of functions and variables for scripting languages and to build a documentation in <a href=\"http:\/\/en.wikipedia.org\/wiki\/Html\" target=\"_blank\">HTML<\/a> or whatever you want. For TigerHeart II C++ headers, source code files and <a href=\"http:\/\/en.wikipedia.org\/wiki\/Lua_%28programming_language%29\" target=\"_blank\">Lua<\/a> bindings are formed. Maybe there will be a time when XSLTs for <a href=\"http:\/\/en.wikipedia.org\/wiki\/C_sharp\" target=\"_blank\">C#<\/a> are added but they are not currently planned.<\/p>\n<p style=\"text-align: center;\"><a title=\"XML: schema\" rel=\"\u201dlightbox\u201d\" href=\"http:\/\/lightrocker.lightrock.biz\/wp-content\/images\/XML_01.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/lightrocker.lightrock.biz\/wp-content\/images\/XML_01t.jpg\" alt=\"XML: schema\" width=\"160\" height=\"120\" \/><\/a> <a title=\"XML sample: Part of the &quot;Object&quot; interface definition\" rel=\"\u201dlightbox\u201d\" href=\"http:\/\/lightrocker.lightrock.biz\/wp-content\/images\/XML_02.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/lightrocker.lightrock.biz\/wp-content\/images\/XML_02t.jpg\" alt=\"XML: sample\" width=\"160\" height=\"120\" \/><\/a> <a title=\"XML transformation: Conversion of an interface into a C++ definition\" rel=\"\u201dlightbox\u201d\" href=\"http:\/\/lightrocker.lightrock.biz\/wp-content\/images\/XML_03.png\"><img decoding=\"async\" src=\"http:\/\/lightrocker.lightrock.biz\/wp-content\/images\/XML_03t.jpg\" alt=\"XML: transformation\" \/><\/a> <a title=\"XML conversion: Result of the sample conversion into a C++ definition\" rel=\"\u201dlightbox\u201d\" href=\"http:\/\/lightrocker.lightrock.biz\/wp-content\/images\/XML_04.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/lightrocker.lightrock.biz\/wp-content\/images\/XML_04t.jpg\" alt=\"XML: result\" width=\"160\" height=\"120\" \/><\/a><\/p>\n<p>After the transformations I can add content to the created source code. If I have to change a type name or a definition later, then I only need to do it once in an XML file and not at every appearance in the code.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Extensible Markup Language (XML) can be used to store any given data. I am using it to design functions, interfaces, classes and other types for the second TigerHeart engine.<br \/>\nBesides pure XML files, which store names, parameters, result types, derivations and so on, there are also a schema (XSD) and transformation files (XSLT).<br \/>\nThe first one &hellip; <\/p>\n<p class=\"toivo-read-more\"><a href=\"https:\/\/lightrocker.lightrock.biz\/?p=20\" class=\"more-link\">Read more <span class=\"screen-reader-text\">XML for engineering<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":{"0":"post-20","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-programming","7":"entry"},"_links":{"self":[{"href":"https:\/\/lightrocker.lightrock.biz\/index.php?rest_route=\/wp\/v2\/posts\/20","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lightrocker.lightrock.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lightrocker.lightrock.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lightrocker.lightrock.biz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lightrocker.lightrock.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=20"}],"version-history":[{"count":4,"href":"https:\/\/lightrocker.lightrock.biz\/index.php?rest_route=\/wp\/v2\/posts\/20\/revisions"}],"predecessor-version":[{"id":86,"href":"https:\/\/lightrocker.lightrock.biz\/index.php?rest_route=\/wp\/v2\/posts\/20\/revisions\/86"}],"wp:attachment":[{"href":"https:\/\/lightrocker.lightrock.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lightrocker.lightrock.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lightrocker.lightrock.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}