Skip to content
rmzelle edited this page Oct 27, 2011 · 20 revisions

This is the official repository for Citation Style Language (CSL) styles.

Validation

Before you submit a new or modified CSL style to the CSL repository, first make sure it validates. Only styles that consist of valid XML and conform to the CSL schema can be expected to work correctly with all CSL-compatible applications.

The easiest way to validate styles is online via Validator.nu. To use this website:

  • Select your style. You can provide an URL if your style is accessible online (the "Address" option), select the style file on your computer ("File Upload"), or copy and paste the complete style code into the text box ("Text Field").
  • Enter the URL to the CSL schema in the "Schemas" text field. For CSL 1.0, this is https://github.com/citation-style-language/schema/raw/v1.0/csl.rnc. To validate styles in the older CSL 0.8.1 format, use https://github.com/citation-style-language/schema/raw/v0.8.1/csl.rnc.
  • 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 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 is invalid, "There were errors.". Warnings can be ignored; only errors are important.

An example of a filled out validation form can be seen here

You can also validate your style with any other 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.

Other pages

Clone this wiki locally