Formats

JATS

Journal Article Tag Suite

Introduction

The JATS (Journal Article Tag Suite) is an XML format that can be used to tag and describe scientific articles. It was developed by the NIH and has been adopted by several journals as a de facto standard for describing journal articles.

Usage

Use the .jats.xml file extension, or the --to jats or --from jats options, when converting to/from JATS e.g.

stencila convert doc.smd doc.jats.xml

By default, the encoded JATS is un-indented. Use the --pretty option for indented XML but note that this may affect whitespace.

Implementation

Stencila supports bi-direction conversion between Stencila document and JATS. Parsing of JATS built on top of the quick-xml Rust crate.

Support

Stencila supports these operations for JATS:

  • decoding from a file
  • decoding from a string
  • encoding to a file
  • encoding to a string

Support and degree of loss by node type:

Node type Encoding Decoding Notes
Works
Article 🔷 Low loss 🔷 Low loss Encoded as <article> using special function
AudioObject 🔷 Low loss 🔷 Low loss Encoded as <inline-media> using special function
AuthorRole
Chat
ChatMessage
ChatMessageGroup
Claim 🔷 Low loss Encoded as <statement>
Collection
Comment
CreativeWork
Directory
Figure 🔷 Low loss Encoded as <fig>
File
ImageObject 🔷 Low loss 🔷 Low loss Encoded as <inline-graphic> using special function
MediaObject Encoded as <inline-media> using special function
Periodical
Prompt
PublicationIssue
PublicationVolume
Review
SoftwareApplication
SoftwareSourceCode
Table Encoded using special function
TableCell Encoded using special function
TableRow Encoded using special function
VideoObject 🔷 Low loss 🔷 Low loss Encoded as <inline-media> using special function
Prose
Admonition 🟢 No loss 🟢 No loss Encoded as <boxed-text>
Annotation Encoded as <annotation>
Cite Encoded using special function
CiteGroup
DefinedTerm
Emphasis 🟢 No loss 🟢 No loss Encoded as <italic>
Heading 🟢 No loss 🟢 No loss Encoded as <title> using special function
Link 🔷 Low loss 🔷 Low loss Encoded as <ext-link>
List 🔷 Low loss Encoded as <list>
ListItem 🔷 Low loss Encoded as <list-item>
Note 🟢 No loss 🟢 No loss Encoded as <fn>
Paragraph 🟢 No loss 🟢 No loss Encoded as <p>
QuoteBlock 🟢 No loss 🟢 No loss Encoded as <disp-quote>
QuoteInline 🟢 No loss 🟢 No loss Encoded as <inline-quote>
Section 🟢 No loss 🟢 No loss Encoded as <sec>
Strikeout 🟢 No loss 🟢 No loss Encoded as <strike>
Strong 🟢 No loss 🟢 No loss Encoded as <bold>
Subscript 🟢 No loss 🟢 No loss Encoded as <sub>
Superscript 🟢 No loss 🟢 No loss Encoded as <sup>
Text 🟢 No loss 🟢 No loss Encoded using special function
ThematicBreak 🟢 No loss 🟢 No loss Encoded as <hr>
Underline 🟢 No loss 🟢 No loss Encoded as <underline>
Math
MathBlock 🟢 No loss 🔷 Low loss Encoded as <disp-formula> using special function
MathInline 🟢 No loss 🔷 Low loss Encoded as <inline-formula> using special function
Code
CodeBlock 🟢 No loss Encoded as <code>
CodeChunk 🔷 Low loss Encoded as <code>
CodeExpression 🔷 Low loss 🔷 Low loss Encoded as <code>
CodeInline 🟢 No loss 🟢 No loss Encoded as <code>
CompilationMessage
ExecutionMessage
Data
Array
ArrayHint
ArrayValidator
Boolean 🔷 Low loss
BooleanValidator
ConstantValidator
Cord 🟢 No loss 🟢 No loss
Datatable
DatatableColumn
DatatableColumnHint
DatatableHint
Date 🟢 No loss 🟢 No loss Encoded as <date> using special function
DateTime 🟢 No loss 🟢 No loss Encoded as <date-time> using special function
DateTimeValidator
DateValidator
Duration 🟢 No loss 🟢 No loss Encoded as <duration> using special function
DurationValidator
EnumValidator
Integer 🔷 Low loss
IntegerValidator
Null 🔷 Low loss
Number 🔷 Low loss
NumberValidator
Object
ObjectHint
String 🟢 No loss 🟢 No loss
StringHint
StringValidator
Time 🟢 No loss 🟢 No loss Encoded as <time> using special function
TimeValidator
Timestamp 🟢 No loss 🟢 No loss Encoded as <timestamp> using special function
TimestampValidator
TupleValidator
Unknown
UnsignedInteger 🔷 Low loss
Flow
Button
CallArgument
CallBlock
CodeLocation
CompilationDigest
ExecutionDependant
ExecutionDependency
ExecutionTag
ForBlock
Form
Function
IfBlock
IfBlockClause
IncludeBlock
Parameter Encoded as <parameter>
Variable
Walkthrough
WalkthroughStep
Style
StyledBlock
StyledInline 🟢 No loss 🟢 No loss Encoded as <styled-content>
Edits
InstructionBlock
InstructionInline
InstructionMessage
PromptBlock
SuggestionBlock
SuggestionInline
Config
Config
Other
Brand
ContactPoint
Enumeration
Grant
ModelParameters
MonetaryGrant
Organization 🔷 Low loss Encoded as <institution>
Person
PostalAddress 🔷 Low loss Encoded as <address>
Product 🔷 Low loss Encoded as <product>
PropertyValue
ProvenanceCount
RawBlock
Thing

See the Rust crate codec-jats for more details.