Native Import XML - Custom Script to import to archive

I am currently writing an Interface between an older custom Managment system for publications and the native XML Import Export Script. I import some metadata for an issue and its articles. The articles are child elements of the issue. Each article has files associated with it. I successfully import the files via local href. A short example with one Article will be provided at the end of the post.

This is a gruesome task. While there is the xml description file, there is limited documentation on how the tags and attributes should be implemented. It is mostly trial and error.

What should happen:
I want the issues to be automatically be set as backissues and to the published state. In short, I want to import an issue and its articles to the archive.

Importing now works fine, but the articles have no association to the issue and are not published. I have to manually do this in the backend. And I have to manually publish the articles.

How do I associate the articles with the issue? I thought by being child elements of the issue, they will be automatically associated.

How can I set the issue and the articles to fully published?

I am on OJS


<?xml version="1.0"?>
<issue xmlns=""
	xmlns:xsi="" xsi:schemaLocation=" native.xsd" published="1" current="1" access_status="1">
	<description locale="en_US">ISSN: 0255-0105&lt;br&gt;ISBN: 978-3-903096-28-8&lt;br&gt;Hrsg.: Nesrine Akkairi</description>
		<title locale="en_US">Annalen des Naturhistorischen Museums in Wien, Serie B</title>
		<cover locale="en_US">
			<cover_image_alt_text>Cover image</cover_image_alt_text>
			<embed encoding="base64">...</embed>
	<articles xmlns:xsi="" xsi:schemaLocation=" native.xsd">
		<article xmlns:xsi="" locale="en_US" date_submitted="2023-05-15" status="5" stage="production">

			<submission_file xmlns:xsi="" xsi:schemaLocation=" native.xsd" stage="submission" id="9" genre="Article Text" viewable="true" uploader="admin" file_id="7">
				<name locale="en_US">122A_165185_Stecher.pdf</name>
				<file id="7" extension="pdf">
					<href src="/path/to/file/122A_165185_Stecher.pdf" />
			<publication xmlns:xsi="" xsi:schemaLocation=" native.xsd" version="1" status="5" primary_contact_id="9" url_path="te-1" seq="0" section_ref="ART">
				<title locale="en_US"><![CDATA[First record of the echinoid genus Orthopsis Cotteau, 1864 from the Kössen Formation (Rhaetian, uppermost Triassic) of Vorarlberg (Austria), with description of a new species]]></title>
				<abstract locale="en_US"><![CDATA[
Abstract<br>Abstract:	Abstract<br>A new species of sea urchin is described from deposits assigned to the Kössen Formation (uppermost Triassic, Rhaetian) of Vorarlberg, Austria. A comparison with other fossil echinoids has shown that the available specimen can be assigned to the genus <i>Orthopsis</i>. Moreover, several distinctive features of the material allow it to be described here as a new species, <i>O. kiseljaki</i> sp. nov. The new species is the stratigraphically earliest representative of the genus and the first to be recorded from the Triassic, although a considerably higher family level diversity of Echinoidea does not occur until the beginning of the Jurassic Period. The new finding from the Kössen Formation implies that the Rhaetian might be an important time for the diversification of echinoids, particularly with regard to the echinacean <i>Orthopsis</i>.<br>Kewords: Late Triassic, Rhaetian, Echinoidea, Orthopsidae, Lorüns Quarry.<br><br>Zusammenfassung<br>Aus der Kössen-Formation (oberste Trias, Rhaetium) von Vorarlberg, Österreich wird ein neue Seeigel-Spezies beschrieben. Vergleiche mit anderen fossilen Echinoiden zeigen, dass es sich bei den Funden um Vertreter der Gattung <i>Orthopsis</i> handelt. Deutliche Unterschiede in den Merkmalen zu anderen <i>Orthopsis</i>-Arten legen außerdem nahe, dass hier eine neue Art vorliegt. Diese wird als <i>Orthopsis kiseljaki</i> sp. nov. eingeführt und beschrieben. Es handelt sich um den stratigraphisch frühesten Vertreter der Gattung und um den ersten Fund aus der Trias. Viele Seeigel-Familien erscheinen zu Beginn der Jurazeit. Der hier dokumentierte Vertreter lässt jedoch vermuten, dass bereits das Rhaetium ein wichtiger Zeitabschnitt für den Ursprung einiger Echinoiden, insbesondere für die Gattung <i>Orthopsis</i>, darstellt.<br>Schlüsselwörter: Obertrias, Rhaetium, Echinoidea, Orthopsidae, Steinbruch Lorüns.
]]>				</abstract>
				<copyrightHolder locale="en_US">Naturhistorisches Museum Wien</copyrightHolder>
				<authors xmlns:xsi="" xsi:schemaLocation=" native.xsd">
					<author include_in_browse="true" user_group_ref="Author" seq="1" id="60">
						<affiliation locale="en_US">N.A</affiliation>

Hi @ThomasM,

I think the XML file misses two things:

A definition of at least one section (which is part of the issue definition).


(after last_modified)
			<section ref="ART" seq="1" editor_restricted="0" meta_indexed="1" meta_reviewed="1"
				abstracts_not_required="0" hide_title="0" hide_author="0" abstract_word_count="0">
				<id type="internal" advice="ignore">0</id>
				<abbrev locale="en_US">ART</abbrev>
				<title locale="en_US">ART</title>

The publication definition then references the section using the section_ref attribute. This you already have.

The publication should contain an article_galley. This references then the submission file.

(after authors)
<article_galley locale="en_US" url_path="" approved="false"
						xsi:schemaLocation=" native.xsd">
						<id type="internal" advice="ignore">1</id>
						<name locale="en_US">PDF</name>
						<submission_file_ref id="0"/>

If you have already an OJS journal, you can export an issue and then construct the XML file similarly.

If you need an example that works for importing, please send me a PM.

Wow, thank you for the quick answer! Hopefully I will find time today to try that!