xmlimport joins section names

Are you an Editor, Author, or Journal Manager in need of help? Want to talk to us about workflow issues? This is your forum.

Moderators: jmacgreg, michael, vgabler, John

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 5
Joined: Thu Jan 22, 2004 2:27 am

xmlimport joins section names

Postby arnost » Wed Jun 09, 2004 2:04 pm

I have problem importing journal data with more than one section.

Here is beginning of my import XML file.

Code: Select all

<issue_description> ... deleted ...  </issue_description>

If I use xmlimport.php, I get folowing results:
• 1. articles
• 12. articlesreviews

Section name and section order for 'reviews' are joined together!

It should be:
• 1. articles
• 2. reviews

Is my import XML file broken? Or is it a bug in OJS?

I changed one line in xmlimport.php:
In function characterData, I changed line

Code: Select all

$_XML_DATA['section_data'][strtolower($matches[1])] .= $data;


Code: Select all

$_XML_DATA['section_data'][strtolower($matches[1])] = $data;

-> change ",= append" to "= set"

Now it display section names correctly. But it is maybe only stupid change which only hides problem :?


Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm

Postby kevin » Wed Jun 09, 2004 8:44 pm

Thanks, that is indeed a bug.

Here's a trivial patch that should fix it:

Code: Select all

Index: xmlimport.php
RCS file: /cvs/ojs/xmlimport.php,v
retrieving revision 1.7
diff -u -r1.7 xmlimport.php
--- xmlimport.php       13 May 2004 08:40:47 -0000      1.7
+++ xmlimport.php       10 Jun 2004 03:43:05 -0000
@@ -588,6 +588,7 @@
        } else if($_XML_DATA['current_tag'] == "^ARCHIVE^ISSUE^SECTION") {
                call_user_func($_XML_DATA['addSectionFunc'], $_XML_DATA['section_data']);
+               $_XML_DATA['section_data'] = array();
        } else if($_XML_DATA['current_tag'] == "^ARCHIVE^ISSUE^ARTICLE") {
                call_user_func($_XML_DATA['addArticleFunc'], $_XML_DATA['current_issue'], $_XML_DATA['issue_data']['year'], $_XML_DATA['article_data']);

Posts: 945
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Importing old issues?

Postby ramon » Mon Jun 14, 2004 6:28 am


We tried to use the system to publish previous issues, but when we try to change the year of the publication it does not insert them into the previous issues, it changes the future issues.

The only way to publish previous issues is the XML import??? :cry:


Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm

Postby kevin » Mon Jun 14, 2004 7:32 pm

Well, in your initial setup of the journal you could specify the "Initial Issue" to be the year of your first issue, and then publish back issues in order up to the present.

But neither this method nor the XML import is designed for publishing older issues _after_ you have already published current issues.

Return to “OJS Editorial Support and Discussion”

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest