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. [Utility &amp; Helpers](/categories/utility)
4. /
5. withanage/jats-converter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

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

JATS XML validator and converter

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

Since Oct 10Pushed 5mo agoCompare

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

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

34

—

LowBetter than 75% of packages

Maintenance69

Regular maintenance activity

Popularity7

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

179d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1921992?v=4)[Dulip Withanage](/maintainers/withanage)[@withanage](https://github.com/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

[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M572](/packages/shopware-core)

PHPackages © 2026

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