Skip to content

Validation

Rintze M. Zelle edited this page May 18, 2016 · 13 revisions

Validation

We rely heavily on validation against the CSL schema to make sure all CSL styles and locale files are of sufficient quality. Only styles and locales that are valid XML and conform to the CSL schema can be expected to work correctly with all CSL-compatible applications.

CSL Validator

To validate your style or locale file, please use our own CSL Validator. Styles and locales can be selected via URL, file upload, or copy and paste into a text field.

Alternative validators

If the CSL Validator website is down or doesn't work, you can try one of the validators below.

csl-validator.js

CSL styles and locale files can also be validated at http://simonster.github.io/csl-validator.js/. Just paste in your style or locale and click the "Validate" button to validate against the CSL 1.0.1 schema. If there aren't any validation errors you will get the message "Validation successful.".

Validator.nu

You can also use Validator.nu:

  • Select your style or locale. You can provide an URL if your style/locale is accessible online (the "Address" option), select the file on your computer ("File Upload"), or copy and paste the complete code into the text box ("Text Field").
  • (preselected if using the link above) Enter the URL to the CSL schema in the "Schemas" text field. For CSL 1.0.1, this is https://github.com/citation-style-language/schema/raw/v1.0.1/csl.rnc. To validate styles in the older CSL 1.0 and 0.8.1 formats, use https://github.com/citation-style-language/schema/raw/v1.0/csl.rnc or https://github.com/citation-style-language/schema/raw/v0.8.1/csl.rnc, respectively.
  • (preselected if using the link above) In the "Parser" drop-down menu, select the "XML; don't load external entities" option. Also check the "Be lax about HTTP Content-Type" check-box.
  • Click the “Validate” button. If the style/locale is valid, you will get the message “The document validates according to the specified schema(s) and to additional constraints checked by the validator.”, or, if the style/locale is invalid, "There were errors.". Warnings can be ignored; only errors are important.

Local Validators

You can also validate your style/locale on your own computer with any tool that offers XML validation and supports the RELAX NG Compact schema language. Examples are the editors Emacs (when used with the nXML addon) and the commercial oXygen XML Editor (both offer real-time validation), and the command-line utilities Jing and RNV.

Something went wrong with that request. Please try again.