# JATS 1.2 Schemas

This repository contains the JATS 1.2 DTD and XSD files that should used for Taylor & Francis journal content.
These schemas have been selected from the schemas that are provided by NISO, and are being provided here for the dual purpose of standardization and convenience.
Included in this repository are the DTD and XML Schema files for JATS version 1.2 with support for the OASIS table model and MathML version 3.

The JATS 1.2 Archiving & Interchange DTD with OASIS and MathML 3 is the baseline which is required to parse XML for Taylor & Francis journal content. In addition, the JATS Publishing DTD with OASIS and MathML 3 is included for use with XML editing tools that can benefit from having more controlled grammar models. Equivalent XML Schemas for Archiving and Publishing are included for use with tools that require an XML Schema.

All JATS 1.2 article XML for Taylor & Francis must begin with a DOCTYPE declaration that includes the public identifier and the complete system URL as shown here:

```xml
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD with OASIS Tables with MathML3 v1.2 20190208//EN" "https://jats.nlm.nih.gov/archiving/1.2/JATS-archive-oasis-article1-mathml3.dtd">
```

If the XML Schema is used, the xsi:noNamespaceSchemaLocation attribute must contain the complete URL as shown here:

```xml
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD with OASIS Tables with MathML3 v1.2 20190208//EN" "https://jats.nlm.nih.gov/archiving/1.2/JATS-archive-oasis-article1-mathml3.dtd">
<article xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://jats.nlm.nih.gov/archiving/1.2/xsd/JATS-archive-oasis-article1-mathml3.xsd">
```

When a JATS XML file is read from disk the DTD informs the XML parser about significant rules, which include: elements that allow mixed text and element content where nodes that contain only white space should not be removed; and default values for attributes. XML parsers should not be configured to ignore DTDs while working with JATS XML for Taylor & Francis journals.

## Public Identifiers and URLs

The following public identifiers and URLs may be used in JATS 1.2 article XML for Taylor & Francis content.

### JATS 1.2 Archiving

* DTD Public Identifier
```
-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD with OASIS Tables with MathML3 v1.2 20190208//EN
```
* DTD System URL
```
https://jats.nlm.nih.gov/archiving/1.2/JATS-archive-oasis-article1-mathml3.dtd
```
* XSD Schema Location URL
```
https://jats.nlm.nih.gov/archiving/1.2/xsd/JATS-archive-oasis-article1-mathml3.xsd
```

### JATS 1.2 Publishing

* DTD Public Identifier
```
-//NLM//DTD JATS (Z39.96) Journal Publishing DTD with OASIS Tables with MathML3 v1.2 20190208//EN
```
* DTD System URL
```
https://jats.nlm.nih.gov/publishing/1.2/JATS-journalpublishing-oasis-article1-mathml3.dtd
```
* XSD Schema Location URL
```
https://jats.nlm.nih.gov/publishing/1.2/xsd/JATS-journalpublishing-oasis-article1-mathml3.xsd
```

## XML Catalog

The `catalog.xml` file should be used to configure XML parsers that support OASIS XML Catalogs to use a local copy of the DTD and XSD files instead of retrieving the files from the Internet.
The URLs at jats.nlm.nih.gov are considered to be a stable, meaning permanent, location of the DTD and XSD files.
However, these URLs have been found to be unresponsive sometimes, and reading a file from a remote location is always going to be slower and less reliable than reading the same file from a local file system.
Most software that supports XML has the ability to use OASIS XML Catalogs. Please consult the documentation for the software you are using for instructions on how to configure a catalog file.

## Minified DTD files

Each JATS DTD provided by NISO is organized in multiple files and contain many informative comments.
The organization in multiple files and the informative comments are useful in some contexts, but in contexts where they are not needed an XML parser is still required to process them when parsing JATS XML.
Minified versions of the JATS DTDs are provided here in the `minified` folder to improve efficiency in contexts where the informative comments and multiple files are not needed. 

For example, some XML editing software such as oXygen can use the comments to display tool tip hints. When using software that does not make use of the comments, the minified DTDs are more efficient.

The minified DTDs are equivalent to the original DTDs from NISO and much smaller:

* Original JATS 1.2 Archiving DTD: 66 files in 1.67 Mb
* Minified JATS 1.2 Archiving DTD: 1 file in 425 KB

The `catalog.xml` file can be edited to use either the minified DTD files or the original DTD files.
To choose the minified DTD files, comment out the set of `public` and `system` elements that point to the .dtd files in the `vendor` folder, and uncomment the set of `public` and `system` elements that point to the .dtd files in the `minified` folder.
Do the reverse to choose the original DTD files, comment out the set of `public` and `system` elements that point to the .dtd files in the `minified` folder, and uncomment the set of `public` and `system` elements that point to the .dtd files in the `vendor` folder.

The minified DTD files were generated from the original DTD files using [DTD Analyzer](https://dtd.nlm.nih.gov/ncbi/dtdanalyzer/).

## Examples

All JATS 1.2 files that are delivered to Taylor & Francis should begin with a DOCTYPE that includes the public identifier and system URL as shown in this example. All namespaces that are used in the document should be declared on the root element.

```xml
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD with OASIS Tables with MathML3 v1.2 20190208//EN" "https://jats.nlm.nih.gov/archiving/1.2/JATS-archive-oasis-article1-mathml3.dtd">
<article article-type="research-article" xml:lang="en" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:oasis="http://www.niso.org/standards/z39-96/ns/oasis-exchange/table" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:ali="http://www.niso.org/schemas/ali/1.0/">
```

If the XML Schema is used, the xsi:noNamespaceSchemaLocation attribute should be included as shown in this example:

```xml
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD with OASIS Tables with MathML3 v1.2 20190208//EN" "https://jats.nlm.nih.gov/archiving/1.2/JATS-archive-oasis-article1-mathml3.dtd">
<article article-type="research-article" xml:lang="en" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:oasis="http://www.niso.org/standards/z39-96/ns/oasis-exchange/table" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://jats.nlm.nih.gov/archiving/1.2/xsd/JATS-archive-oasis-article1-mathml3.xsd">
```
