University of Leicester

Department of Computer Science

 XML for Structured Requirements 


ReqSol 1.0

For several years I have taught a 1st year module CO1006 Software Engineering and Professional Practice at Leicester. This course includes an account of requirements elicitaion based on the book by Tom Gilb [Gilb88]. Some key features of this approach are:

The Gilb methodology leads to a highly structured requirements document which is ideally suited to an XML presentation. As an aid to teaching this methodology to undergraduates, I have produced a Document Type Definition (DTD) which declares a set of tags suitable for the presentation of structured requirements and for structured solutions documents.

Documents which conform to these DTDs may be transformed into a standard HTML format for the human reader by applying XSL stylesheets. The format includes a structured list giving the elements in summary and a flat list giving each element in detail (Gilb says that it should be possible to give an overview of a requirements specification in a page or so).

To see how this works, consider the following example of a requirements specification and solutions document for a project concerning mobile computing for a British National Health Service Trust.

XML source HTML layout
NHS-req.xml NHS-req.html
NHS-sol.xml NHS-sol.html

Compare the HTML document against the XML source in each case (you may need to download the XML to disk and read it as plain text rather than view it directly through your browser).

[Gilb88] Tom Gilb.
Principles of Software Engineering Management. Addison-Wesley (1988).

Download

The DTDs, stylesheets, etc. are freely available under the BSD License as a package ReqSol 1.0 (download the source in a gzipped tar-file reqsol-1.0.tar.gz or, for Windows, a zip file reqsol-1.0.zip).

You will also need a suitable implemementation of XSL transformations (XSLT), e.g. xsltproc or Xalan.

Use tar to unpack the distribution:

  tar xvzf reqsol-1.0.tar.gz

  cd reqsol/1.0

You should find subdirectories: dtds, stylesheets, images, doc, examples.

If you are using xsltproc then you should be able to type

  make

to run xsltproc on the documentation and the examples.

If you want to use the local copies of the DTDs rather than have xsltproc fetch them across the Internet then you will need to set the SGML_CATALOG_FILES variable to point at the catalog file in ./dtds, for example

  export SGML_CATALOG_FILES=~/reqsol/1.0/dtds/catalog

You can then invoke xsltproc with the --nonet --catalogs options.

Emacs users will probably want to use psgml mode to edit requirements and solutions documents. Adding the following lines to your .emacs file will make emacs aware of the DTDs (replace REQSOLHOME by a full path as appropriate).

  ;; psgml mode --- pick up dtds for REQSOL documents from local directory.

  (defvar sgml-local-catalogs '("REQSOLHOME/reqsol/1.0/dtds/catalog"))

If you want your HTML output to link to local copies of the images and documentation (rather than those on http://www.mcs.le.ac.uk) then edit the URLs in stylesheets/config.xsl.

[University Home] [Faculty of Science] [MCS Home] [CS Home] [University Index A-Z] [University Search] [University Help]

Author: Simon Ambler
Created: 20th January 2003
Last modified: 21st January 2003, 13:49:46
MCS Web Maintainer
Any opinions expressed on this page are those of the author.
© University of Leicester.