{"id":11,"date":"2012-02-28T21:53:38","date_gmt":"2012-02-29T02:53:38","guid":{"rendered":"http:\/\/chris.nitchie.com\/blog\/?p=11"},"modified":"2012-02-29T10:10:20","modified_gmt":"2012-02-29T15:10:20","slug":"dita-in-15-minutes","status":"publish","type":"post","link":"https:\/\/chris.nitchie.com\/blog\/dita-in-15-minutes\/","title":{"rendered":"DITA in 15 Minutes"},"content":{"rendered":"<p>There&#8217;s been a lot of talk on the DITA Technical Committee lately about the perception that DITA is too complex. It&#8217;s got me thinking. I think the reason people think DITA is too complex is that there are a lot of features in DITA that are not there in other basic XML languages &#8211; conrefs, keyrefs, reltabels, scope\/format\/type, etc., and it&#8217;s incredibly hard to learn all of them at once. I also think that while DITA maps allow a lot of flexibility, all that flexibility carries a considerable complexity cost. I mean, the &lt;topicref&gt; element has 38 attributes. 38! And I think the human mind looks at all those attributes and just shuts down. But if you strip away all the bells and whistles, I don&#8217;t think it&#8217;s that hard.<\/p>\n<p>So. DITA 101. From zero to DITA in 15 minutes. What follows isn&#8217;t an in-depth discussion of everything you could ever possibly do with DITA, but hopefully it provides a basic overview of what DITA <em>is<\/em>.\u00a0Prerequisites for this class: a basic understanding of XML as a format for documentation. Ready? Here we go.<\/p>\n<p>DITA, at its core, is is two basic concepts.<\/p>\n<ol>\n<li>Author content in small, self-contained, reusable chunks.<\/li>\n<li>Remove as many barriers to sharing content as possible.<\/li>\n<\/ol>\n<p>A publication represented as a Microsoft Word document is a great big hunk of text and tables and pictures and whatnot; if you want to reuse part of it in another document, you copy and paste it to that other document. But now if you want to change something in that reused hunk, you have to change it in all the places it&#8217;s used. That&#8217;s not very efficient.<\/p>\n<p>For that and other reasons, XML-based content authoring was born, where you still author one great bug hunk of text, but now you have tools and systems that can take that big hunk and break it down into chunks that can be reused<em>\u00a0directly<\/em>\u00a0in other publications. Change the content once, and those changes automatically happen everywhere that chunk is used. Plus, now you&#8217;re authoring semantically rich content. Instead of saying, &#8220;these set of words here? That&#8217;s a person&#8217;s name, and we make people&#8217;s names bold and yellow and blinking,&#8221; the author just has to say, &#8220;that&#8217;s a person&#8217;s name.&#8221; The color and font and blinky-ness of a peoples&#8217; names is somebody else&#8217;s job, and can all be automated. Which is great! But. It introduces a whole <em>new<\/em>\u00a0set of problems. XML uses document types, and content using one document type can&#8217;t be used with content of another document type. Reusable chunks are often coded in a way that puts restrictions on exactly how and where they can be reused. And anybody who&#8217;s been in this industry for a while can talk your ear off about something called Entity Hell. Trust me, you don&#8217;t want to know.<\/p>\n<p>So, unto the breach, comes DITA. At the core of DITA are two simple but radical concepts.<\/p>\n<ol>\n<li>Flip the authoring paradigm. Rather than starting from one big publication and then breaking it apart into its components, some of which might, hopefully, be reusable chunks&#8230; <em>start<\/em>\u00a0with the reusable chunks. All content is authored in small, self-contained chunks that can be reused in any number of publications.<\/li>\n<li>Any DITA &#8216;chunk&#8217; can be reused with any DITA publication, regardless of its document type.<\/li>\n<\/ol>\n<p>That&#8217;s it. Author in small chunks, and author in a way that can be easily shared.\u00a0Got it? Good. So first: authoring in small chunks. Let&#8217;s talk about topics.<\/p>\n<p>It&#8217;s a bit of a mind-flip for authors, but a liberating one. Forget context. Forget document flow. All you, the author, have to worry about is documenting <em>one specific thing<\/em>. A topic is basically a traditional document, but instead of being burst into chunks, it <em>is<\/em>\u00a0a small chunk, meant to be combined with others. But you don&#8217;t have to care about that. All you have to care about is documenting <em>one thing<\/em>. Let other people worry about how use that information.<\/p>\n<p>There are three main topic types in core DITA:<\/p>\n<ol>\n<li>Concepts. &#8220;What is it?&#8221;<\/li>\n<li>Tasks. &#8220;How do I do it?&#8221;<\/li>\n<li>References. &#8220;Give me all the nitty-gritty details.&#8221;<\/li>\n<\/ol>\n<p>There are others &#8211; glossary entry, strict task (like task, but <em>meaner<\/em>), and any number of custom topic types, but these are the basics.<\/p>\n<p>All topics have the same basic structure. They may use different tag names to describe this structure, but the structure is always the same, for every DITA topic, everywhere, forever. That structure is:<\/p>\n<ol>\n<li>A title and prologue including alternate titles and descriptive information about the contents of the topic.<\/li>\n<li>A body, with the main content.<\/li>\n<li>An optional list of links to related content.<\/li>\n<li>An optional set of nested topics.<\/li>\n<\/ol>\n<p>All topics use the same basic set of tags: paragraphs, lists, links, quotes, pre-formatted regions, phrases, etc. &#8211; that are <em>specialized<\/em>\u00a0into more meaningful tags. For example, the DITA &lt;b&gt; tag (&#8216;bold&#8217;) is a specialization of &lt;ph&gt; (&#8216;phrase&#8217;). The DITA standard specifies a relatively small set of fundamental tags, and most of those tags will be familiar to anybody who&#8217;s ever dealt with XML or HTML content. A topic type may use a completely custom set of tags, but <em>every tag in every DITA topic is based on that core set<\/em>. Always. Forever. Every time. And that&#8217;s why you can use any DITA document with any DITA publication. Any given DITA processor may not know how to deal with &lt;process&gt;, but if &lt;process&gt; is a specialization of &lt;ol&gt; (&#8216;ordered list&#8217;), any DITA processor will handle it gracefully.<\/p>\n<pre>&lt;topic id=\"topic\"&gt;\r\n  &lt;title&gt;Example Topic&lt;title&gt;\r\n  &lt;body&gt;\r\n    &lt;p&gt;Hello World!&lt;\/p&gt;\r\n  &lt;\/body&gt;\r\n&lt;\/topic&gt;<\/pre>\n<p>So. That&#8217;s topics. Once I have a bunch of topics, how do I create a publication? Well, for that, we have to talk about maps.<\/p>\n<p>A DITA map is a collection of &lt;topicref&gt; elements that describe the structure of a publication.<\/p>\n<pre>&lt;map&gt;\r\n  &lt;title&gt;My Publication&lt;\/title&gt;\r\n  &lt;topicref href=\"HelloWorld.dita\"&gt;\r\n    &lt;topicref href=\"SubTopic.dita\"\/&gt;\r\n  &lt;\/topicref&gt;\r\n  &lt;topicref href=\"SomeOtherTopic.dita\"\/&gt;\r\n&lt;\/map&gt;<\/pre>\n<p>Pretty simple, right? You simply structure the &lt;topicref&gt; elements in a map to match the Table of Contents for your publication. Any DITA-aware processor can take a map, find those topics, perform various transformations, and produce some sort of publication. Just like in topics, there&#8217;s a core set of tags that can be specialized for more specific uses, but unlike topic, <em>most tags in every map anywhere is some specialization of a single tag: &lt;topicref&gt;<\/em>.<\/p>\n<pre>&lt;bookmap&gt; &lt;!-- I'm a specialization of &lt;map&gt; --&gt;\r\n  &lt;title&gt;I'm a Book!&lt;\/title&gt;\r\n  &lt;bookmeta\/&gt; &lt;!-- I'm a &lt;topicmeta&gt;. Ignore me for now. --&gt;\r\n  &lt;frontmatter&gt; &lt;!-- But I'm a topicref. --&gt;\r\n    &lt;booklists&gt; &lt;!-- Me too! --&gt;\r\n      &lt;toc\/&gt; &lt;!-- I'm... wait, am I? I am?! Cool. --&gt;\r\n    &lt;\/booklists&gt;\r\n  &lt;\/frontmatter&gt;\r\n  &lt;part href=\"part1.dita\"&gt; &lt;!-- Uh-huh! --&gt;\r\n    &lt;chapter href=\"part1chap1.dita\"\/&gt; &lt;!-- Don't forget me! --&gt;\r\n  &lt;\/part&gt;\r\n  &lt;backmatter&gt; &lt;!-- You guessed it! --&gt;\r\n    &lt;booklists&gt; &lt;!-- Remember me? --&gt;\r\n      &lt;indexlist\/&gt;  &lt;!-- Boo-yah. --&gt;\r\n    &lt;\/booklists&gt;\r\n  &lt;\/backmater&gt;\r\n&lt;\/bookmap&gt;<\/pre>\n<p>There <em>are<\/em>\u00a0other types of tags that are common in maps. You can use &lt;topicmeta&gt; within a &lt;topicref&gt; to provide metadata and processing behavior for the referenced content. But for the most part, when you&#8217;re dealing with a map, you&#8217;re dealing with &lt;topicrefs&gt;.<\/p>\n<p>Of course, there&#8217;s lots more to it than this. As I said, the &lt;topicref&gt; element alone has 38 attributes that can be used to control how the ultimate publication is rendered. But hopefully this gives you a basic understanding of the major building blocks of DITA.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There&#8217;s been a lot of talk on the DITA Technical Committee lately about the perception that DITA is too complex. It&#8217;s got me thinking. I think the reason people think DITA is too complex is that there are a lot &hellip; <a href=\"https:\/\/chris.nitchie.com\/blog\/dita-in-15-minutes\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[6,7],"class_list":["post-11","post","type-post","status-publish","format-standard","hentry","category-dita","tag-dita-2","tag-simpledita"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>DITA in 15 Minutes - (parenthetical)<\/title>\n<meta name=\"description\" content=\"A quick introduction to the DITA paradigm.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/chris.nitchie.com\/blog\/dita-in-15-minutes\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"chris\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/chris.nitchie.com\/blog\/dita-in-15-minutes\/\",\"url\":\"https:\/\/chris.nitchie.com\/blog\/dita-in-15-minutes\/\",\"name\":\"DITA in 15 Minutes - (parenthetical)\",\"isPartOf\":{\"@id\":\"https:\/\/chris.nitchie.com\/blog\/#website\"},\"datePublished\":\"2012-02-29T02:53:38+00:00\",\"dateModified\":\"2012-02-29T15:10:20+00:00\",\"author\":{\"@id\":\"https:\/\/chris.nitchie.com\/blog\/#\/schema\/person\/f4cc662fd241d8669da987af726ffe22\"},\"description\":\"A quick introduction to the DITA paradigm.\",\"breadcrumb\":{\"@id\":\"https:\/\/chris.nitchie.com\/blog\/dita-in-15-minutes\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/chris.nitchie.com\/blog\/dita-in-15-minutes\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/chris.nitchie.com\/blog\/dita-in-15-minutes\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/chris.nitchie.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DITA in 15 Minutes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/chris.nitchie.com\/blog\/#website\",\"url\":\"https:\/\/chris.nitchie.com\/blog\/\",\"name\":\"(parenthetical)\",\"description\":\"Random, occasional comment.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/chris.nitchie.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/chris.nitchie.com\/blog\/#\/schema\/person\/f4cc662fd241d8669da987af726ffe22\",\"name\":\"chris\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/chris.nitchie.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2bd5a62428ce2196e0ea56beaf2179ad0f9ad2c32a406c40530cc013c0157b54?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2bd5a62428ce2196e0ea56beaf2179ad0f9ad2c32a406c40530cc013c0157b54?s=96&d=blank&r=g\",\"caption\":\"chris\"},\"sameAs\":[\"http:\/\/chris.nitchie.com\"],\"url\":\"https:\/\/chris.nitchie.com\/blog\/author\/chris\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"DITA in 15 Minutes - (parenthetical)","description":"A quick introduction to the DITA paradigm.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/chris.nitchie.com\/blog\/dita-in-15-minutes\/","twitter_misc":{"Written by":"chris","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/chris.nitchie.com\/blog\/dita-in-15-minutes\/","url":"https:\/\/chris.nitchie.com\/blog\/dita-in-15-minutes\/","name":"DITA in 15 Minutes - (parenthetical)","isPartOf":{"@id":"https:\/\/chris.nitchie.com\/blog\/#website"},"datePublished":"2012-02-29T02:53:38+00:00","dateModified":"2012-02-29T15:10:20+00:00","author":{"@id":"https:\/\/chris.nitchie.com\/blog\/#\/schema\/person\/f4cc662fd241d8669da987af726ffe22"},"description":"A quick introduction to the DITA paradigm.","breadcrumb":{"@id":"https:\/\/chris.nitchie.com\/blog\/dita-in-15-minutes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/chris.nitchie.com\/blog\/dita-in-15-minutes\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/chris.nitchie.com\/blog\/dita-in-15-minutes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/chris.nitchie.com\/blog\/"},{"@type":"ListItem","position":2,"name":"DITA in 15 Minutes"}]},{"@type":"WebSite","@id":"https:\/\/chris.nitchie.com\/blog\/#website","url":"https:\/\/chris.nitchie.com\/blog\/","name":"(parenthetical)","description":"Random, occasional comment.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/chris.nitchie.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/chris.nitchie.com\/blog\/#\/schema\/person\/f4cc662fd241d8669da987af726ffe22","name":"chris","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/chris.nitchie.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2bd5a62428ce2196e0ea56beaf2179ad0f9ad2c32a406c40530cc013c0157b54?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2bd5a62428ce2196e0ea56beaf2179ad0f9ad2c32a406c40530cc013c0157b54?s=96&d=blank&r=g","caption":"chris"},"sameAs":["http:\/\/chris.nitchie.com"],"url":"https:\/\/chris.nitchie.com\/blog\/author\/chris\/"}]}},"_links":{"self":[{"href":"https:\/\/chris.nitchie.com\/blog\/wp-json\/wp\/v2\/posts\/11","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chris.nitchie.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chris.nitchie.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chris.nitchie.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/chris.nitchie.com\/blog\/wp-json\/wp\/v2\/comments?post=11"}],"version-history":[{"count":11,"href":"https:\/\/chris.nitchie.com\/blog\/wp-json\/wp\/v2\/posts\/11\/revisions"}],"predecessor-version":[{"id":29,"href":"https:\/\/chris.nitchie.com\/blog\/wp-json\/wp\/v2\/posts\/11\/revisions\/29"}],"wp:attachment":[{"href":"https:\/\/chris.nitchie.com\/blog\/wp-json\/wp\/v2\/media?parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chris.nitchie.com\/blog\/wp-json\/wp\/v2\/categories?post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chris.nitchie.com\/blog\/wp-json\/wp\/v2\/tags?post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}