Example Constraints Plugin

One of the most important features, in my opinion, of DITA 1.2 is the constraints mechanism. In short, constraints let you reduce the elements and attributes available to your authors. You can also specify when elements/attributes are required, and which tag structures are legal (and, therefore, which are illegal). Eliot Kimber wrote a great tutorial on how to set up constraints, but if you’d like an example plugin, you can download the one I’ve created off sourceforge.

Reducing elements and attributes makes authoring easier because you eliminate the noise you may get from a default DITA deployment. Don’t use <screen>? You can eliminate it. Fewer elements also means fewer styles to maintain.

Best of all, constraints get built into a plugin, which means you can have any number of constraint sets active in your toolkit. Want a set for experienced DITA authors and another for SMEs? You can do that. In fact, you could reduce DITA to just paragraphs and lists, making it simple for non-DITA users to begin creating DITA content.

I’ve posted a constraint plugin to sourceforge to provide an example or a starting place for others. The constraints are based on the checks run in our QA plugin. Installing the constraint plugin is straightforward and I’ve included a few sample topics (with appropriate doctype declarations); setting up Oxygen is the easiest way to test them out. You can configure XMetaL to use constraints too, but it isn’t nearly as easy.

One thought on “Example Constraints Plugin

Leave a Reply

Your email address will not be published. Required fields are marked *