NLM StyleChecker v5.17

This version of the NLM StyleChecker is a single XSL transform that can be used to check the XML tagging style for regular PMC articles, manuscripts, and books (<book> and <book-part> based).

The transform will test an XML file against a set of templates and create an output XML file with the root element <ERR>, which is a copy of the original file. Where style non-compliance occurs in the original file, the transform will insert either an <error> or <warning> element, with a human-readable comment.

You should be using a validating XSL processor because several of the tests depend on the id() function. We are using C++ Xalan in the PMC production area to run this transform. It would be good to make sure you are validating the files against the DTD at the first transform.

This transform will apply the appropriate set of rules for the content that it is running against. The complete PMC Tagging Guidelines defines the rules for content tagged in JATS v1.0, NLM DTD v3.0, and NLM DTD v2.3, as well as for books tagged in BITS v2.0. The Tagging Guidelines are available here:

In the download package:


The main file is nlm-stylechecker.xsl, and it xsl:include(s):

  • stylecheck-match-templates.xsl
  • stylecheck-named-tests.xsl
  • stylecheck-helper-templates.xsl

Usage params

Identify the style to check against using the stylesheet-level parameter style=(manuscript|book|article). Check the documentation of your XSL processor on how to pass in a stylesheet-level parameter at runtime.

StyleChecker Parameters:
  • manuscript - nihms manuscript style
  • book - book content in PMC
  • article - published articles (Default)

HTML report maker

style-reporter.xsl (included in the distribution) takes the output of nlm-stylechecker.xsl and makes an HTML Error/Warning report. The report shows:

  1. Name and path of the file being tested
  2. Root element of the file
  3. Rules that the file is being checked against (article, manuscript, book)
  4. Version of the Stylechecker
  5. A summary of the total warnings and errors
  6. Details of unique errors that link to the problem spot in the article below
  7. A copy of the article with the error/warning messages in place
  8. Some errors/warning link back to the proper place in the appropriate tagging guidelines (based on the stylesheet-level style parameter set when the transform was called)
To run the report maker:
  1. Run the article through nlm-stylechecker.xsl. This will create a new document with a root element of <ERR> which will contain a copy of the original file, with any Errors or Warnings in <error> or <warning> elements, placed in the article code.
  2. Run the output of the first conversion through style-reporter.xsl to get an html report.

Tagging Guidelines Email List

As you may be aware, both the Tagging Guidelines and Style Checker are updated quarterly, in an effort to make the PMC archive more robust, improve the quality of the XML submitted, and ensure stability for future retrieval. PubMed Central announces these periodic changes through our pmc-tagging-guidelines email list. To subscribe, please visit:

Please send any questions or comments to PubMed Central

Support Center

Last updated: Mon, 03 Aug 2015