From 95e4db636d72ffd93b77690fcaf4931ddb444d00 Mon Sep 17 00:00:00 2001 From: Erik Hanson Date: Wed, 27 Mar 2024 14:58:05 -0700 Subject: [PATCH] pkp/pkp-lib#9525 Update Crossref schema to 5.3.1 --- .../I9525_CrossrefSchemaUpdate.inc.php | 26 +++++++++++++++++++ dbscripts/xml/upgrade.xml | 6 ++++- .../crossref/CrossrefExportDeployment.inc.php | 6 ++--- .../filter/ArticleCrossrefXmlFilter.inc.php | 1 - .../crossref/filter/filterConfig.xml | 4 +-- 5 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 classes/migration/upgrade/I9525_CrossrefSchemaUpdate.inc.php diff --git a/classes/migration/upgrade/I9525_CrossrefSchemaUpdate.inc.php b/classes/migration/upgrade/I9525_CrossrefSchemaUpdate.inc.php new file mode 100644 index 00000000000..54e92139104 --- /dev/null +++ b/classes/migration/upgrade/I9525_CrossrefSchemaUpdate.inc.php @@ -0,0 +1,26 @@ +whereIn('symbolic', ['issue=>crossref-xml', 'article=>crossref-xml']) + ->update(['output_type' => 'xml::schema(https://www.crossref.org/schemas/crossref5.3.1.xsd)']); + } + + /** + * @throws DowngradeNotSupportedException + */ + public function down() + { + throw new DowngradeNotSupportedException(); + } +} diff --git a/dbscripts/xml/upgrade.xml b/dbscripts/xml/upgrade.xml index 0a7d1f5a1ec..1da183a2eb7 100644 --- a/dbscripts/xml/upgrade.xml +++ b/dbscripts/xml/upgrade.xml @@ -82,7 +82,7 @@ - + @@ -208,6 +208,10 @@ + + + + diff --git a/plugins/importexport/crossref/CrossrefExportDeployment.inc.php b/plugins/importexport/crossref/CrossrefExportDeployment.inc.php index ee3e82b9249..751924c6793 100644 --- a/plugins/importexport/crossref/CrossrefExportDeployment.inc.php +++ b/plugins/importexport/crossref/CrossrefExportDeployment.inc.php @@ -18,10 +18,10 @@ */ // XML attributes -define('CROSSREF_XMLNS' , 'http://www.crossref.org/schema/4.3.6'); +define('CROSSREF_XMLNS' , 'http://www.crossref.org/schema/5.3.1'); define('CROSSREF_XMLNS_XSI' , 'http://www.w3.org/2001/XMLSchema-instance'); -define('CROSSREF_XSI_SCHEMAVERSION' , '4.3.6'); -define('CROSSREF_XSI_SCHEMALOCATION' , 'https://www.crossref.org/schemas/crossref4.3.6.xsd'); +define('CROSSREF_XSI_SCHEMAVERSION' , '5.3.1'); +define('CROSSREF_XSI_SCHEMALOCATION' , 'https://www.crossref.org/schemas/crossref5.3.1.xsd'); define('CROSSREF_XMLNS_JATS' , 'http://www.ncbi.nlm.nih.gov/JATS1'); define('CROSSREF_XMLNS_AI' , 'http://www.crossref.org/AccessIndicators.xsd'); define('CROSSREF_XMLNS_XML', 'http://www.w3.org/XML/1998/namespace'); diff --git a/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php b/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php index a852e437fb3..2d6e1efeb0f 100644 --- a/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php +++ b/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php @@ -92,7 +92,6 @@ function createJournalArticleNode($doc, $submission) { $journalArticleNode = $doc->createElementNS($deployment->getNamespace(), 'journal_article'); $journalArticleNode->setAttribute('publication_type', 'full_text'); - $journalArticleNode->setAttribute('metadata_distribution_opts', 'any'); $journalArticleNode->setAttribute('language', PKPLocale::getIso1FromLocale($locale)); diff --git a/plugins/importexport/crossref/filter/filterConfig.xml b/plugins/importexport/crossref/filter/filterConfig.xml index 5c965b1b889..8e4a66ff9f5 100644 --- a/plugins/importexport/crossref/filter/filterConfig.xml +++ b/plugins/importexport/crossref/filter/filterConfig.xml @@ -18,14 +18,14 @@ displayName="plugins.importexport.crossref.displayName" description="plugins.importexport.crossref.description" inputType="class::classes.issue.Issue[]" - outputType="xml::schema(https://www.crossref.org/schemas/crossref4.3.6.xsd)" /> + outputType="xml::schema(https://www.crossref.org/schemas/crossref5.3.1.xsd)" /> + outputType="xml::schema(https://www.crossref.org/schemas/crossref5.3..xsd)" />