Home/Publications/Best Practices Newsletter/2013 – Best Practices Newsletter/Continuous Publishing of the British National Formulary using DITA


April 2013


Continuous Publishing of the British National Formulary using DITA

CIDMIconNewsletter Emma Burrows, Royal Pharmaceutical Society


For over 150 years, the Pharmaceutical Press (PhP) has produced high-quality reference books aimed at those who use pharmaceutical products in their professional lives, including pharmacy students, forensic toxicologists, doctors, nurses, and other medical practitioners.

The production of PhP reference works are largely managed in house with editorial teams creating and revising content. However, over the decades, each publication, such as Martindale: The Complete Drug Reference, Stockley’s Drug Interactions or the British National Formulary (BNF) <http://www.medicinescomplete.com>, had evolved their own separate formats and processes, with a focus primarily on producing the printed books.

More recently, the Pharmaceutical Press has delivered content online, via MedicinesComplete1, an online subscription service for healthcare professionals, allowing federated searching across its publications. As a result, some effort had been made over the last decades to convert the publications to electronic formats that were easier to convert for distribution to third-parties and to create the MedicinesComplete web site. Several publications had been migrated into an XML-based CMS, but due to pressure from the editors, they were all using different XML structures developed on an ad hoc basis by the in-house development team, making content sharing and reuse across publications—including BNF and its sister publications BNF for Children—practically impossible. Many publications also still remained in non-XML formats, such as the ASCII file UNIX-based system developed in the 1970s for Martindale.

Converting the British National Formulary

However, in 2011, the decision was made to convert one of the Pharmaceutical Press’s most important publications, the British National Formulary <http://bnf.org>, to a specialised DITA XML structure and to update its production processes. The British National Formulary was created in the 1940s in collaboration with the British Medical Association to provide the new National Health Service with a standard list of drugs deemed suitable for prescribing. Today, it is still distributed to every doctor, nurse, pharmacist, dentist, and hospital in the NHS and is a well-respected tool for medical practitioners in the UK.

The BNF was published every six months in book format and updated on MedicinesComplete at the same time. Its publication process involved the editors working on paper copies of the previous edition, photocopying source material and typing up proposed editorial changes in Word. The papers were physically circulated to reviewers and approvers during the editorial phase. Once the content was signed off on paper, it was handed over approximately three months before the publication date to a separate team of “databasers” who would type in the changes to the XML CMS.

The decision to convert to DITA was partly in response to market conditions such as the continuing decline of book sales, the fact that the BNF’s content was only updated at most every six months and was potentially several weeks out of date by the time a new edition was published, due in part to the need to put the changes into the database. The NHS, BNF’s main customer, asked for monthly updates in electronic format, which would not have been possible with the existing process. The requirement to deliver raw XML to our customers also meant that a standard format with existing third-party tools would be preferable to continuing with the in-house DTDs we were using at the time.


DITA was chosen as the new XML delivery format because it was an OASIS standard with good community support and existing tools, including good quality commercial products like SyncroSoft’s Oxygen. Furthermore, it offered the following features which were important to the Pharmaceutical Press.


The ability to specialise the schema and organise mark-up into type hierarchies means that specific information that might need to be extracted from the BNF as data—lists of drug contra-indications, for example—can be tagged with semantic mark-up (for instance, an element called <contra-indications/>) while allowing elements to be grouped, for example for styling, and also provide a “base” DITA element so the content can still be consumed by generic DITA tools.

Thus, a contra-indications element might get the following class annotation:

<contra-indications class=”- topic/section php/monodiv php/contra-indications”/>

DITA allows the specialised schema to specify that an element contains semantic contra-indications information, but is also a type of monograph division (“monodiv”) for styling purposes, and more generally a DITA section as shown in Figure 1.

Specialisation - Burrows


One of the reasons for choosing a standard format for our customers was to save them the extra development work required to consume our products. In the past, a customer receiving the BNF in XML would have needed to adapt their tools to handle <contra-indications/> and about 100 other custom elements. With DITA, it is possible to generalise the specific mark-up back to plain structures on export. Thus, customers will receive the contra-indications data as the DITA element <section/> instead of <contra-indications/>.

Content Reuse

Another key feature of interest to the Pharmaceutical Press was DITA’s built-in support for content reuse. The BNF is aimed at practitioners treating adult patients, and its sister publication, BNF for Children (BNFC), contains the same content, but tailored to the needs of paediatric care. In the past, a great deal of content was copied and pasted, or retyped manually, to keep the two publications in sync with each other.

DITA offers the possibility not only to share fragments of text using content references (conrefs), but also to reuse entire topics thanks to the organisation of the publications into DITA maps. The BNFC map is now being gradually amended to include topics directly from the BNF, with conditional text added to the BNF record as needed. In future, these shared records will only need to be amended once to update both publications automatically.

Conversion Process

In order to meet the monthly update requirement, we had to reengineer the development processes and took the opportunity to adopt an Agile development methodology to perform frequent, incremental changes to the systems supporting the editorial process (see Figure 2).

Agile - Burrows

This method was also applied to the content conversion, with an iterative cycle of conversion to the specialised DITA schema and from there to the basic DITA export for our customers, and then incorporating feedback from our in-house editorial teams, external customers, and the partners such as the typesetter and the company which produces MedicinesComplete. The result was a more rigorous and pragmatic approach to converting our data, taking into account not only the DITA specification, but also the reality of our legacy content and its intended uses.


Some workarounds or compromises were necessary along the way. For instance, the DITA 1.2 schema doesn’t allow elements derived from <ph/> in index terms, and this excludes mark-up like subscript or superscript which is significant in medical texts. While it was possible to correct this omission in the specialised DITA schema, the exported content had to use a workaround involving using the <data/> element instead. (This issue in 1.2 is due to be fixed in DITA 1.3)

In other cases, workarounds had to be used because of customer expectations based on their existing knowledge of the BNF. For example, drug preparation titles in the BNF often refer to footnotes containing important information on the suitability of a drug, but DITA doesn’t allow footnotes in <title/> elements. Customer feedback was that they expected the footnote references to be in the titles as they were in the book, so a workaround had to be devised, wrapping <fn/> elements in a <ph/> purely to get the resulting title to validate against the 1.2 schema even though it technically breaks its content model.

Continuous Publishing

Thanks to the move to DITA, the Pharmaceutical Press now has a specialised DITA schema and a set of conversion, editorial, and publishing tools to support it. It will now be possible to convert the other in-house publications to the same specialised schema and take advantage of the same tools with a minimal amount of additional effort.

In particular, the requirement for monthly updates has meant that the export process in the CMS was adapted so that records are exported according to their status. Only records which have been approved are exported from the system for any given release. If a record is still in the process of being revised, its last published version is exported. This means that a complete, up to date, and editorially signed-off copy of the publication can be exported at any point, without any need for a strict and lengthy editorial cycle as was the case in the past.


The adoption of DITA at the Pharmaceutical Press has allowed the BNF to move from a six-month paper-based editorial process to an entirely electronic process which allows for continuous updates. The successful publication on schedule, of both BNF and BNFC books in paper format, the monthly updates on MedicinesComplete and the NHS’s NHS Evidence web site, have proved to our internal editorial team and external partners that DITA was the right choice for our new process. CIDMIconNewsletter

About the Author:

Emma Burrows

Emma Burrows
Royal Pharmaceutical Society

Emma Burrows is the XML development specialist at the Pharmaceutical Press and has been responsible for the conversion of their publications from the existing systems into DITA XML over the last two years, including data analysis, specialisation of the DITA schema, and production of DITA-compliant outputs.

[The Pharmaceutical Press is the publishing division of the Royal Pharmaceutical Society, the body which represents the interests of pharmacists in England, Scotland and Wales]