PHPackages                             withanage/jats-converter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. withanage/jats-converter

ActiveLibrary

withanage/jats-converter
========================

JATS XML validator and converter

V1.0.1(4mo ago)0141MITPHPPHP &gt;=8.1

Since Oct 10Pushed 4mo agoCompare

[ Source](https://github.com/withanage/jats2jats)[ Packagist](https://packagist.org/packages/withanage/jats-converter)[ RSS](/packages/withanage-jats-converter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (9)Versions (3)Used By (0)

JATS Converter
==============

[](#jats-converter)

PHP library for validating, converting, and enhancing JATS (Journal Article Tag Suite) XML documents with advanced reference processing capabilities.

Features
--------

[](#features)

- **JATS XML Validation**: Validate against JATS schema (v1.3 supported)
- **Reference Management**:
    - Check for missing references and add placeholders
    - Reorder references sequentially based on citation order
    - Split combined references (e.g., `[3,4]` → `[3] [4]`)
    - Process bracketed citations and convert to proper JATS xref elements

Installation
------------

[](#installation)

```
composer require withanage/jats-converter
```

Requirements
------------

[](#requirements)

- PHP 8.0 or higher
- DOM extension
- libxml extension
- (Optional) doi2jats package for DOI enhancement

Quick Start
-----------

[](#quick-start)

### Basic Usage

[](#basic-usage)

### Command Line Interface

[](#command-line-interface)

```
cd /vendor/withanage/
# list Help
php jats-converter/bin/jats-converter --help

# Basic conversion
php jats-converter/bin/jats-converter input.xml output.xml

# With reference checking
php jats-converter/bin/jats-converter input.xml output.xml --reference-check

# Reorder references sequentially
php jats-converter/bin/jats-converter input.xml output.xml --reorder-references

# Split combined references
php jats-converter/bin/jats-converter input.xml output.xml --split-references

# Process bracketed citations
php jats-converter/bin/jats-converter input.xml output.xml --process-brackets

# Combine multiple features
php jats-converter/bin/jats-converter input.xml output.xml \
    --reorder-references \
    --split-references \
    --process-brackets \
    --reference-check \
    --detailed
```

Processing Modules
------------------

[](#processing-modules)

### 1. Reference Check

[](#1-reference-check)

Validates that all citations in the document have corresponding references in the reference list and optionally adds placeholders for missing ones:

```

  Recent studies [1] have shown that
  climate change [2] affects biodiversity
  [3].

        Climate Study

        Climate Study

        Placeholder for missing reference: ref2. Please add appropriate citation details.

        Placeholder for missing reference: ref3. Please add appropriate citation details.

```

**Validation Output:**

```
Found 3 citations, 1 references, 2 missing references

Missing reference(s): "ref2", "ref3"
  • Missing "ref2" → Line 45: [2] in context: ...climate change **[[2]]** affects biodiversity...
  • Missing "ref3" → Line 45: [3] in context: ...affects biodiversity **[[3]]**....

Added 2 placeholder references

```

### 2. Bracketed Citation Processor

[](#2-bracketed-citation-processor)

Converts plain text bracketed citations into proper JATS xref elements:

```

Recent studies [1000] have shown...

Recent studies [1000] have shown...
```

### 3. Reference Splitter

[](#3-reference-splitter)

Splits combined reference citations:

```

[3,4]

[3]
[4]
```

### 4. Reference Reorderer

[](#4-reference-reorderer)

Renumbers references sequentially based on order of appearance:

```

```

CLI Options
-----------

[](#cli-options)

OptionDescription`--schema-version, -s`JATS schema version (default: 1.3)`--reference-check, -c`Check for missing references and add placeholders`--reorder-references, -r`Reorder references sequentially`--split-references, -p`Split combined references`--process-brackets, -b`Process bracketed citations`--detailed, -d`Display detailed conversion information`--log-file, -l`Log file pathLicense
-------

[](#license)

This project is licensed under the MIT License - see the LICENSE file for details.

Support
-------

[](#support)

For issues, questions, or contributions, please visit the [GitHub repository](https://github.com/withanage/jats-converter).

Acknowledgments
---------------

[](#acknowledgments)

- Marco Grönewold (TIB)

Development
-----------

[](#development)

- Dulip Withanage (TIB)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance77

Regular maintenance activity

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~87 days

Total

2

Last Release

126d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4220afa2efac061217cfaa15396e8feb01314242011ae599532aa28f52a0c2d9?d=identicon)[withanage](/maintainers/withanage)

---

Top Contributors

[![withanage](https://avatars.githubusercontent.com/u/1921992?v=4)](https://github.com/withanage "withanage (10 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/withanage-jats-converter/health.svg)

```
[![Health](https://phpackages.com/badges/withanage-jats-converter/health.svg)](https://phpackages.com/packages/withanage-jats-converter)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

81733.7k](/packages/flow-php-flow)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
