NativeXML validation errors

Hi @racemochridhe,

Changes introduced with OJS 3.2 are described in the 3.2 Release Notebook – however this doesn’t describe the XML specifically. To see how an XML file needs to be adapted, you can look at the changes in the two relevant XSD files.

For plugins/importexport/native/native.xsd:

diff --git a/ojs-stable-3_1_2/plugins/importexport/native/native.xsd b/ojs-stable-3_2_1/plugins/importexport/native/native.xsd
index 311f145..2119b8e 100644
--- a/ojs-stable-3_1_2/plugins/importexport/native/native.xsd
+++ b/ojs-stable-3_2_1/plugins/importexport/native/native.xsd
@@ -3,9 +3,9 @@
 <!--
   * plugins/importexport/native/native.xsd
   *
-  * Copyright (c) 2014-2019 Simon Fraser University
-  * Copyright (c) 2003-2019 John Willinsky
-  * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
+  * Copyright (c) 2014-2020 Simon Fraser University
+  * Copyright (c) 2003-2020 John Willinsky
+  * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
   *
   * Schema describing native XML import/export elements specific to OJS
   -->
@@ -22,15 +22,6 @@
 		<complexType>
 			<complexContent>
 				<extension base="pkp:submission">
-					<sequence>
-						<element ref="pkp:issue_identification" minOccurs="0" maxOccurs="1" />
-						<element maxOccurs="1" minOccurs="0" name="pages" type="string" />
-						<element ref="pkp:citations" minOccurs="0" maxOccurs="unbounded"/>
-						<element ref="pkp:covers" minOccurs="0" maxOccurs="1" />
-					</sequence>
-					<attribute name="section_ref" type="string" use="required" />
-					<attribute name="seq" type="int" />
-					<attribute name="access_status" type="int" />
 					<attribute name="stage" use="required">
 						<simpleType>
 							<restriction base="string">
@@ -47,6 +38,28 @@
 	</element>
 	<element name="articles" substitutionGroup="pkp:submissions" />
 
+	<!-- Permit "citation" as a root element to keep the filters happy -->
+	<element name="citation" type="string" />
+
+	<element name="publication" substitutionGroup="pkp:pkppublication">
+		<complexType>
+			<complexContent>
+				<extension base="pkp:pkppublication">
+					<sequence>
+						<element ref="pkp:issue_identification" minOccurs="0" maxOccurs="1" />
+						<element maxOccurs="1" minOccurs="0" name="pages" type="string" />
+						<element ref="pkp:covers" minOccurs="0" maxOccurs="1" />
+						<element maxOccurs="1" minOccurs="0" name="issueId" type="int" />
+						<element ref="pkp:citations" minOccurs="0" maxOccurs="unbounded"/>
+					</sequence>
+					<attribute name="section_ref" type="string" use="required" />
+					<attribute name="seq" type="int" />
+					<attribute name="access_status" type="int" />
+				</extension>
+			</complexContent>
+		</complexType>
+	</element>
+
 	<!-- Configure the use of the "article_galley" representation -->
 	<element name="article_galley" substitutionGroup="pkp:representation">
 		<complexType>
@@ -128,6 +141,7 @@
 		<attribute name="published" type="int" use="optional" />
 		<attribute name="current" type="int" use="optional" />
 		<attribute name="access_status" type="int" use="optional" />
+		<attribute name="url_path" type="string" use="optional" />
 	</complexType>
 
 	<element name="issue_identification">
@@ -144,6 +158,7 @@
 	<complexType name="issue_galley">
 		<sequence>
 			<element name="label" type="string" minOccurs="1" maxOccurs="1" />
+			<element ref="pkp:id" minOccurs="0" maxOccurs="unbounded" />
 			<element ref="pkp:issue_file" minOccurs="0" maxOccurs="1" />
 		</sequence>
 		<attribute name="locale" type="string" />

…and for lib/pkp/plugins/importexport/native/pkp-native.xsd:

diff --git a/ojs-stable-3_1_2/lib/pkp/plugins/importexport/native/pkp-native.xsd b/ojs-stable-3_2_1/lib/pkp/plugins/importexport/native/pkp-native.xsd
index 78d95c2..30aa069 100644
--- a/ojs-stable-3_1_2/lib/pkp/plugins/importexport/native/pkp-native.xsd
+++ b/ojs-stable-3_2_1/lib/pkp/plugins/importexport/native/pkp-native.xsd
@@ -3,9 +3,9 @@
 <!--
   * plugins/importexport/native/pkp-native.xsd
   *
-  * Copyright (c) 2014-2019 Simon Fraser University
-  * Copyright (c) 2003-2019 John Willinsky
-  * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
+  * Copyright (c) 2014-2020 Simon Fraser University
+  * Copyright (c) 2003-2020 John Willinsky
+  * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
   *
   * Schema describing native XML import/export elements shared across PKP applications
   -->
@@ -106,6 +106,7 @@
 					<attribute name="filetype" type="normalizedString" use="required" />
 				</complexType>
 			</element>
+			<element name="salesType" minOccurs="0" maxOccurs="1" />
 		</sequence>
 		<attribute name="id" type="normalizedString" />
 		<attribute name="stage">
@@ -149,6 +150,7 @@
 			<element name="is_default" type="boolean" />
 			<element name="show_title" type="boolean" />
 			<element name="permit_self_registration" type="boolean" />
+			<element name="permit_metadata_edit" type="boolean" />
 			<element name="name" type="pkp:localizedNode" minOccurs="0" maxOccurs="unbounded" />
 			<element name="abbrev" type="pkp:localizedNode" minOccurs="0" maxOccurs="unbounded" />
 			<element name="stage_assignments" type="string" minOccurs="1" maxOccurs="1" />
@@ -188,6 +190,8 @@
 				<attribute name="primary_contact" type="boolean" default="false" />
 				<attribute name="user_group_ref" type="pkp:user_group_ref" use="required" />
 				<attribute name="include_in_browse" type="boolean" default="true" />
+				<attribute name="seq" type="int" use="required" />
+				<attribute name="id" type="int" use="required" />
 			</extension>
 		</complexContent>
 	</complexType>
@@ -206,9 +210,25 @@
 				<element name="remote" type="pkp:remote" minOccurs="0" maxOccurs="1" />
 			</choice>
 		</sequence>
+		<attribute name="locale" type="string" use="optional" />
+		<attribute name="url_path" type="string" use="optional" />
 	</complexType>
 
 	<complexType name="submission">
+		<sequence>
+			<element ref="pkp:id" minOccurs="0" maxOccurs="unbounded" />
+
+			<!-- Metadata -->
+			<element ref="pkp:submission_file" minOccurs="0" maxOccurs="unbounded" />
+			<element ref="pkp:pkppublication" minOccurs="1" maxOccurs="unbounded" />
+		</sequence>
+		<attribute name="status" type="string" use="optional" />
+		<attribute name="current_publication_id" type="int" use="optional" />
+		<attribute name="date_submitted" type="date" use="optional" />
+		<attribute name="submission_progress" type="int" use="optional" />
+	</complexType>
+
+	<complexType name="pkppublication">
 		<sequence>
 			<element ref="pkp:id" minOccurs="0" maxOccurs="unbounded" />
 
@@ -229,7 +249,6 @@
 			<element ref="pkp:disciplines" minOccurs="0" maxOccurs="unbounded" />
 			<element ref="pkp:subjects" minOccurs="0" maxOccurs="unbounded" />
 			<element ref="pkp:authors" minOccurs="1" maxOccurs="1" />
-			<element ref="pkp:submission_file" minOccurs="0" maxOccurs="unbounded" />
 			<element ref="pkp:representation" minOccurs="0" maxOccurs="unbounded" />
 			<element ref="pkp:citations" minOccurs="0" maxOccurs="unbounded"/>
 		</sequence>
@@ -237,6 +256,10 @@
 		<attribute name="language" type="string" use="optional" />
 		<attribute name="date_submitted" type="date" use="optional" />
 		<attribute name="date_published" type="date" use="optional" />
+		<attribute name="version" type="int" use="optional" />
+		<attribute name="status" type="int" use="optional" />
+		<attribute name="primary_contact_id" type="int" use="optional" />
+		<attribute name="url_path" type="string" use="optional" />
 	</complexType>
 
 	<!-- ************
@@ -302,6 +325,8 @@
 	<!-- Permit "submission" as a root element -->
 	<element name="submission" type="pkp:submission" abstract="true" />
 
+	<element name="pkppublication" type="pkp:pkppublication" />
+
 	<!-- Controlled vocabularies -->
 	<element name="keywords">
 		<complexType>

The biggest change is related to versioning support, which was added to OJS 3.2.0. Instead of the article metadata being attached ot the <article> element, it’s now attached to the <publication> element, and each <article> can have several <publication>s.

There is a sample 3.2.1 import that’s used by our automated testing available here: ojs/export-issues.xml at stable-3_2_1 · pkp/ojs · GitHub

Regards,
Alec Smecher
Public Knowledge Project Team