Drupal has all the elements to build a custom content model that can mirror a DITA specialisation. The really exciting thing is that this data model can be built from the UI, without a single line of code. While there are considerable drawbacks to the usability of the resulting interface, the fact that this is a free and open source implementation means that those who have more time than money could use this implementation as a starting point to build a DITA CCMS that accommodates an arbitrary specialisation.

I am really excited about this because for the first time it is now feasible to build a completely free and open source CCMS for DITA, or for any other XML language for that matter. Such a starting point would enable a community of DIY technical writers to bootstrap a full featured open source CCMS. Through small incremental improvements the community could further improve the implementation so that it becomes useful for a broader audience.

Drupal modules

To achieve this I’ve used the following modules:

  • Paragraphs: normally meant to enable rich structured web pages, that don’t rely on a WYSIWYG editor. The Paragraph field lets you define a set of predefined field bundles that can be added at a location in the page. Because you can add a paragraph field to a paragraph bundle, this allows you to nest bundles as deep as you need them to go (this is hard to explain, just watch the screencast if this wasn’t clear).

  • Asset: the asset module was originally conceived to enable reuse of media assets. But because it is possible to create custom assets with any fields you want, this enables you to define a series of elements that can be added into a CKeditor field, with an arbitrary content architecture. Currently assets display as blocklevel elements. But I think it should be possible to define in-line elements. As a bonus the Asset module includes assets by reference, which means you can use this to create arbitrary reusable elements. So Drupal can also do transclusion...

This is fairly complex to express in words, so I’ve included a screencast that shows you how the modules work and what you can do with them.

Video demo


The video shows:

The paragraphs module and how you can use it to:

  • add a paragraph
  • define what bundles to use
  • create a paragraph bundle
  • add fields to a paragraph bundle

The asset module and how you can use it to:

  • define what assets can be used by a filter type
  • create a new asset
  • add fields to an asset

A prototype for the DITA task content model and how you can use it for:

  • obligatory elements
  • optional elements
  • grouping elements under a top level group
  • choosing between 2 optional elements
  • adding any number of optional elements
  • infinite nesting

Output

The content model, while closely resembling the DITA model, will have some redundancy: sometimes you need an additional level in the form to achieve the proper behavior (e.g. when you can choose between 2 optional elements). Also in some cases it might not be possible to name the label conform to DITA standards because of the expected label format in Drupal.

To get to a valid output it would be enough to build an output function that generates an XML file in which each of the fields is encapsulated in a tag pair for the field name upon which an XSLT transformation is done to remove redundant elements and to replace fields with an incorrect tag with their proper element tag.

Since we don’t need to move elements around, a simple replacement feature should be enough to generate valid DITA XML. It is easy to imagine a visual interface that would enable someone who is not a developer to build this transformation, through a series of replacement pairs, so that you wouldn’t need a developer to build the content model and to generate the proper output.

Future

So what is next? Should we build such a CCMS? Maybe we could make an example implementation for Lightweight DITA? The only part that is currently missing is the output function and it’s interface. If there is sufficient interest I will consider asking one of our developers to build the module and we could build the Lightweight DITA implementation at a code sprint, at one of the coming DITA conferences.

Interested in an open source DITA CCMS?

If you would like to use and/or contribute to a free an open source DITA CCMS, fill in our form to help us decide how much time to invest in this project:

About the author

Kristof van Tomme

CEO, Co-founder

Kristof is a Drupal strategist and architect with a degree in bioengineering. He started his career as a technology manager. At Pronovix, the company he co-founded, he’s been focussing on Drupal since 4.7. Recently his interest in DITA and reusable, single source documentation have culminated in the WalkHub.net project, an open source project that aims to become the GitHub of website documentation.

He initiated and later became the co-organizer of an introductory Drupal course at the University of Szeged (Hungary). As a permanent member of the Drupal Association, he was at some point the lead for the selection task force for European Drupalcons and of the inaugural Nomination Committee. Among others, he was the initiator and (co-)lead of Drupalcon Szeged (2008), DrupalCXO Brussels (2010), Drupal Developer Days Brussels (2011) and Drupal Government Days (2011). Currently he is involved in the organization of the Write the docs unconference in Berlin (2014 July).