What is MIME type "application/vnd.citationstyles.style+xml"?

A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.

application/vnd.citationstyles.style+xml is a MIME type for files that define citation formatting rules in XML.
It is used by files with the CSL extension.
This MIME type tells applications how to render citations and bibliographies automatically. It uses XML for a standardized description of style rules.
For further reading, visit the Citation Style Language website.

Associated file extensions

Usage Examples

HTTP Header

When serving content with this MIME type, set the Content-Type header:


    Content-Type: application/vnd.citationstyles.style+xml    
  

HTML

In HTML, you can specify the MIME type in various elements:


    <a href="file.dat" type="application/vnd.citationstyles.style+xml">Download file</a>    
  

Server-side (Node.js)

Setting the Content-Type header in Node.js:


    const http = require('http');    
    
    http.createServer((req, res) => {    
      res.setHeader('Content-Type', 'application/vnd.citationstyles.style+xml');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

What is the primary purpose of application/vnd.citationstyles.style+xml?

This MIME type identifies Citation Style Language (CSL) files, which define how bibliographies and citations are formatted (e.g., APA, MLA, Chicago). It is primarily used by reference management software like Zotero, Mendeley, and Papers to apply specific styling rules to documents automatically.

How do I configure an Apache server to serve CSL files correctly?

To ensure your Apache server sends the correct headers for CSL files, add the following directive to your .htaccess file or httpd.conf: AddType application/vnd.citationstyles.style+xml .csl. This prevents browsers from misinterpreting the file as generic text or XML.

How do I add support for this MIME type in Nginx?

In Nginx, open your mime.types file (usually located in /etc/nginx/) and add the entry: application/vnd.citationstyles.style+xml csl;. After saving the file, reload the server configuration using sudo nginx -s reload to apply the changes.

Why does my browser show XML code when I open a CSL file?

Because the MIME type ends in +xml, modern browsers recognize the file as structured data and display the raw XML tree. To install the style into a reference manager, you usually need to download the file or use an application-specific installation link rather than viewing it directly in the browser.

Can I edit files with the application/vnd.citationstyles.style+xml type?

Yes, since these are text-based XML files, you can edit them using any code editor like Notepad++ or VS Code. However, for easier editing without learning the syntax, it is recommended to use a visual editor like the one provided at citationstyles.org.

What should I do if a CSL file downloads as a .xml file instead of .csl?

This usually happens if the server is misconfigured and sends a generic text/xml or application/xml header. You can safely rename the file extension from .xml to .csl manually, and your reference management software should recognize it immediately.

General FAQ

What is a MIME type?

A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.

MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.

MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.

How do I find the MIME type for a file?

You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.

Why are multiple MIME types listed for one extension?

Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.