Skip to content

Port JATSParser plugin to OJS 3.5#93

Open
monmarzia-archi wants to merge 2 commits into
Vitaliy-1:mainfrom
archicoop:ojs35-port
Open

Port JATSParser plugin to OJS 3.5#93
monmarzia-archi wants to merge 2 commits into
Vitaliy-1:mainfrom
archicoop:ojs35-port

Conversation

@monmarzia-archi

Copy link
Copy Markdown

Hi @Vitaliy-1,

What changed

The core parsing logic (JATSParser library) is unchanged. The changes cover:

PHP API migration — namespaces (PSR-4), Hook::add() replacing HookRegistry::register(), Repo:: facade replacing Services::get(), class constants, removal of import(), .inc.php → .php rename
Workflow UI rewrite — Smarty template + Vue 2 form replaced by a Vue 3 component (js/jatsParserWorkflow.js) + dedicated AJAX handler (JatsParserWorkflowHandler.php), integrated via pkp.registry.storeExtendFn
JATSParser library extensions — added support for additional JATS tags (boxed-text, preformat, def-list, disp-formula, inline-graphic) and fixed reference extraction
OJS 3.5 workflow store fix — args.selectedPublication no longer available in getPrimaryItems; publication is now retrieved from args.submission.publications
Locale updates — new localization strings for the workflow tab; locale folders renamed from POSIX (en_US) to IETF (en) format

Note on legacy files

This PR adds the new .php files and Vue 3 component but does not remove the old .inc.php files and Smarty templates. They are no longer used in the OJS 3.5 port. We left them in place to let you decide how to handle the transition — happy to remove them if you prefer.

Tests

This PR includes a PHPUnit test suite (tests/) covering:

JATS XML body parsing (new and existing tags)
Reference/citation extraction
HTML document generation

PHPUnit is a dev dependency in composer.json. To run: composer install then vendor/bin/phpunit.
Tested on

OJS 3.5.0.4, PHP 8.2, MariaDB 10.6

Breaking changes

None. Plugin behavior and database schema are unchanged.

@Vitaliy-1

Copy link
Copy Markdown
Owner

Hi @monmarzia-archi,

Could you make a separate PR without the submodule? Only to the Plugin's code itself?

@monmarzia-archi

Copy link
Copy Markdown
Author

@Vitaliy-1 PR updated — removed vendor directory and legacy files. Let me know if you'd prefer a fresh PR instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants