The JATS workflow plug-in converts JATS to Content XML (CXML). You can customise Typefi's JATS library, Jats.core, to fit your publishing needs. This article will introduce you to JATS and Jats.core, and provide examples for customising Jats.core.
What is JATS?
The Journal Article Tag Suite (JATS) is an XML format used to describe scientific literature published online. It provides authors and publishers with a set of XML elements and attributes to model the semantics and structures of journal articles. JATS is the de jure (officially recognised) standard in scholarly publishing.
Typefi's JATS workflow plug-in includes two workflow actions: Export to JATS and Import JATS. Behind the scenes, Typefi's JATS library converts JATS to Content XML (CXML) or vice versa. CXML is the data format used by Typefi to encode content.
Each article in a journal has its own JATS file. A journal article typically contains:
- Front Matter (represented by
<front>
)- journal-level metadata, such as the journal title and identifiers
- article-level metadata, such as the article title, author(s), abstract and identifiers like a DOI
- Body Matter (represented by
<body>
)- paragraphs
- sections
- figures and graphics
- tables
- equations
- quotations
- Back Matter (represented by
<back>
)- appendices
- bibliographies
Here is a simple JATS document with front matter, body matter, and back matter:
JATS is designed to be customisable, so publishers can easily extend it according to their production needs. See Implement custom requirements for an example.
Introducing Typefi's JATS library
Typefi's JATS library, Jats.core, is an XSLT 2.0 based framework that was created to avoid code duplication when converting JATS documents.
Jats.core features:
- Table conversion: XHTML and CALS table formats conversion to CXML (see jats-tables.xsl).
- Text processing: Character mapping and generating character styles for text (see jats-text.xsl).
- Style processing: Includes soft and character styles processing (see jats-styles.xsl).
- Break up: Splits paragraphs that contain nested block elements (see jats-break-up.xsl)
Jats.core was built around the key concepts of extensibility and integration. As such, Jats.core uses a module-based architecture with a single entry point (jats.xsl). The jats.xsl entry point connects all modules using the jats/jats-imports.xsl file import. All modules are connected via the xsl:import instruction.
Jats.core modules are grouped by several criteria:
- Part of the XML tree that is processed (like jats-article.xsl)
- Feature logic
- Common elements, such as templates, functions, parameters and variables (for example, jats-functions.xsl)
For more information about Jats.core, refer to the JATS developer documentation.
Customise Typefi's JATS library
You can specify how the JATS workflow plug-in transforms JATS to Content XML (or vice versa) by modifying the input XSLT files and customising the JATs.core.
Understand XZIP files
XZIP files are inputs for XSLT-based workflow actions. An XZIP file is a standard ZIP file that contains XSLT stylesheets and XML catalogs. Typefi uses the .xzip filename extension rather than the standard .zip filename extension so that Typefi Server knows not to decompress the file.
The primary purpose of XZIP files is to package XSLT libraries, XSLT customisations, and XML catalogs (with document type definitions [DTDs] if necessary) into one archive to maintain the integrity of the whole transform.
You will need an XZIP file for the Import JATS workflow action:
Workflow action: Import JATS
Input: XML file
Output: Typefi Content XML (.cxml) file
XZIP: XZIP file (.xzip) with custom changes
Preferred structure
For more information about XZIP files, see XZIP files.
File and folder structure in the Transforms folder
Use the Transform folder to hold custom XSLT files.
Example
Example Publishing Inc., a publishing company, has two journals: Journal 1 and Journal 2. Both journals are published in JATS, with some company-specific requirements. Furthermore, Journal 1 and Journal 2 each have slightly different publishing requirements. To meet their publishing needs, this company customises Jats.core.
Example Publishing's Transforms folder (which contains custom XSLTs), is organised like this:
- Journal-1
- journal-1 (folder)
- journal-2 (folder)
- journal-1.xsl
- custom-library (folder)
- Journal-2
- journal-1 (folder)
- journal-2 (folder)
- journal-2.xsl
- custom-library (folder)
Journal-1.xsl contains these <xsl:import > elements:
<xsl:import href="library/jats.xsl"/>
→ Basic Library (JATS.core library)<xsl:import href="custom-library/custom-library.xsl"/>
→ Common changes for both entries<xsl:import href="journal-1/journal-1-imports.xsl"/>
→ Journal 1 entry specific changes
And, journal-2.xsl contains these <xsl:import> elements:
<xsl:import href="library/jats.xsl"/>
→ Basic Library (JATS.core library)<xsl:import href="custom-library/custom-library.xsl"/>
→ Common changes for both entries<xsl:import href="journal-2/journal-2--imports.xsl"/>
→ Journal 2 entry specific changes
Implement custom requirements
Custom requirements might include:
- Overriding existing template,
- Implementing a new requirement not supported by the Jats.core library, or
- Overriding attribute names.
Override existing templates ↩
You can override existing templates—for example, changing the content placement order in tps:section/@type = "article"
. In this case, Journal 1 and Journal 2 expect two different outputs, and it is totally different from the core library order. Therefore, you need to implement custom changes in each entry as this is not a common solution for both.
In Jats.core, jats-article.xsl:
In the Journal 1 folder, journal-1-article.xsl:
In the Journal 2 folder, journal-2-article.xsl:
Implement a new requirement not supported by the library ↩
After confirming the requirement, if there is no template for that, you need to implement that in the corresponding codebase.
Override attribute names
All variables are defined in the jats-settings.xsl file. If you need to change any of the attribute names, override that file. In this case also, as explained earlier, you need to identify a suitable folder (custom-library, journal-1, or journal-2) according to the customer requirement and whether a common solution can be used for both journals.
See also
Comments
0 comments
Please sign in to leave a comment.