Skip to content

Commit

Permalink
pkp/pkp-lib#9525 Update Crossref schema to 5.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ewhanson committed Apr 2, 2024
1 parent bc41f94 commit 95e4db6
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 7 deletions.
26 changes: 26 additions & 0 deletions classes/migration/upgrade/I9525_CrossrefSchemaUpdate.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

use Illuminate\Database\Capsule\Manager as Capsule;
use PKP\install\DowngradeNotSupportedException;

class I9525_CrossrefSchemaUpdate extends \Illuminate\Database\Migrations\Migration
{
/**
* Run the migrations.
* @return void
*/
public function up()
{
Capsule::table('filter_groups')
->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();
}
}
6 changes: 5 additions & 1 deletion dbscripts/xml/upgrade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<!-- migrateUserAndAuthorNames should be after migrateSRLocale -->
<code function="migrateUserAndAuthorNames" condition="return $installer->tableExists('users_tmp');" />
</upgrade>

<upgrade minversion="2.4.0.0" maxversion="3.1.9.9">
<code function="migrateSubmissionCoverImages" />
</upgrade>
Expand Down Expand Up @@ -208,6 +208,10 @@
<note file="docs/release-notes/README-3.3.0" />
</upgrade>

<upgrade minversion="3.0.0.0" maxversion="3.3.0.17">
<migration class="classes.migration.upgrade.I9525_CrossrefSchemaUpdate" />
</upgrade>

<!-- update plugin configuration - should be done as the final upgrade task -->
<code function="addPluginVersions" />
</install>
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));


Expand Down
4 changes: 2 additions & 2 deletions plugins/importexport/crossref/filter/filterConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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)" />
<!-- Crossref XML article output -->
<filterGroup
symbolic="article=>crossref-xml"
displayName="plugins.importexport.crossref.displayName"
description="plugins.importexport.crossref.description"
inputType="class::classes.submission.Submission[]"
outputType="xml::schema(https://www.crossref.org/schemas/crossref4.3.6.xsd)" />
outputType="xml::schema(https://www.crossref.org/schemas/crossref5.3..xsd)" />
</filterGroups>
<filters>
<!-- Crossref XML issue output -->
Expand Down

0 comments on commit 95e4db6

Please sign in to comment.