Common Errors

Errors that may be encountered in validating a CMLComp file:

Important. If you encounter an error about "duplicate ID values", please ignore it. This is a bug in validator.nu

1. Bad value for attribute "units"

  • Unit names must be QNames. A QName is two NCNames separated by a colon; where each NCName begins with a letter, and contains only letters, numbers, and the characters "-" (hyphen), "_" (underscore) and "." (period). Thus castepunits:ev is ok, castepunits:1/A is not.
  • Furthermore, the first half of the QName must be declared as a namespace prefix. so in the above example, there should be a declaration at the beginning of the document something like: xmlns:castepunits="http://www.materialsgrid.org/castep/units". Note that this namespace prefix is case-sensitive - so castepunits and castepUnits will be treated differently.

2. Bad value for attribute "id"

  • Any value for an id attribute must be a Name. That is, it must begin with a letter, and contain only letters, numbers and the characters "-" (hyphen), "_" (underscore), "." (period), and ":" (colon).