OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Need native.dtd EXAMPLE

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Need native.dtd EXAMPLE

Postby Sherman » Sat Dec 10, 2005 8:24 pm

I'm tinkering around with a dummy installation of OJS 2.0.x and need to import gazoodles of articles over about a dozen years.

Unfortunately, the documentation on native.dtd omits any examples of the file that one might then write. Since I don't read .dtd files for a living (or pleasure!), I need a bit of help, and I suspect other editors would appreciate it as well.
Sherman
 
Posts: 60
Joined: Sat Dec 10, 2005 8:18 pm
Location: Tampa, FL

Found sample, and have error...

Postby Sherman » Sat Dec 10, 2005 9:10 pm

Ah! I found the example (if a bit thin) in plugins\importexport\native\sample.xml and modified it to the following as a test:

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE issues SYSTEM "native.dtd">

<!--
  * sample.xml
  *
  * Copyright (c) 2003-2005 The Public Knowledge Project
  * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
  *
  * Sample import document for the OJS 2.x native XML import/export format.
  *
  * $Id: sample.xml,v 1.4 2005/08/27 01:29:19 alec Exp $
  -->

<issues>
 <issue>
<volume>1</volume>
<number>1</number>
<year>1993</year>
  <title>Action Research and Social Movement</title>
  <open_access />
  <section>
   <title>Articles</title>
   <article>
<abstract>Large-scale policy research on topics of concern to teachers may assist in changing educational theory, policy and practice, as may educational action research. This article discusses different traditions of action research in relation to their views about the connection of research and social movement, touching on the so-called "macro-micro" problem which bedevils conceptualizations of this relationship.</abstract>
<indexing>
<discipline>education</discipline>
</indexing>
    <title>Action Research and Social Movement: A Challenge for Policy Research</title>
    <author>
     <firstname>Stephen</firstname>
     <lastname>Kemmis</lastname>
<affiliation>Deakin University-Geelong</affiliation
<email>kemmis@deakin.edu.au</email>
    </author>
    <htmlgalley>
     <label>HTML</label>
     <file>
      <href src="http://epaa.asu.edu/epaa/v1n1.html" mime_type="text/html" />
     </file>
     </htmlgalley>
   </article>
  </section>
 </issue>
</issues>


And here's the error message in the management panel:

This plugin does not support the supplied root node "". Please ensure that the file is correctly formed and try again.


... and at the top of the page ...

not well-formed (invalid token)
Warning: Cannot modify header information - headers already sent by (output started at /home/shermand/www/www/epaa/classes/xml/XMLParser.inc.php:66) in /home/shermand/www/www/epaa/classes/template/TemplateManager.inc.php on line 154


Ideas?
Sherman
 
Posts: 60
Joined: Sat Dec 10, 2005 8:18 pm
Location: Tampa, FL

Postby asmecher » Mon Dec 12, 2005 11:38 am

Hi Sherman,

Get an XML validator and run the file through it for more information. I use xmllint; for Windows, I've heard XMLSpy is good. Make sure you validate against the DTD.

In the file you've included, look at line 33 -- you're missing part of the close tag for "affiliation".

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8329
Joined: Wed Aug 10, 2005 12:56 pm

Postby Sherman » Mon Dec 12, 2005 1:35 pm

Thanks—a little bit of fiddling and it took the article. Of course, now the editor panels won't let me schedule it or otherwise get it up in the dummy's "public" side, but I assume there's a small trick there I haven't found. (It's stuck as the "you need a review version to assign a reviewer" stage as if it's a new submission, even though there's an HTML file. I'll go back and create a galley tag and see if that helps.)
Sherman
 
Posts: 60
Joined: Sat Dec 10, 2005 8:18 pm
Location: Tampa, FL

Postby Sherman » Mon Dec 12, 2005 1:49 pm

Okay: including the <galley> tag worked, and I uploaded a dummy file just to get something in layout so I could schedule it, but then I saw the following after trying to schedule it:

DB Error: Duplicate entry '9' for key 2


I think it's because of my several attempts to upload the .xml import file led to several databases with the same title for the issue (or article). Is there a way to delete submission items?
Sherman
 
Posts: 60
Joined: Sat Dec 10, 2005 8:18 pm
Location: Tampa, FL

Postby asmecher » Mon Dec 12, 2005 2:53 pm

Hello Sherman,

Failed imports could indeed cause this; deleting submissions (particularly failed imports) could correct the problem.

You can delete submissions by archiving them (see submission the summary page as Editor) and then deleting them from the archives.

If this doesn't get things going again, I'll need some more information on the problem. Did you get the error message when you pressed the "Send submission to Scheduling" button, or was it something else?

Note that the native import plugin is intended to import directly to published articles, so it shouldn't be necessary to send articles to scheduling -- they should already be scheduled.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8329
Joined: Wed Aug 10, 2005 12:56 pm

Postby Sherman » Mon Dec 12, 2005 3:27 pm

asmecher wrote:Note that the native import plugin is intended to import directly to published articles, so it shouldn't be necessary to send articles to scheduling -- they should already be scheduled.


Aha! No, they weren't already scheduled. Is there a place where I should look for an import log to see what happened?
Sherman
 
Posts: 60
Joined: Sat Dec 10, 2005 8:18 pm
Location: Tampa, FL

Postby asmecher » Mon Dec 12, 2005 4:04 pm

Hi Sherman,

This depends on the specifics of the import process you're following.

If you're importing an XML document with with a root node of <article> or <articles>, you should be prompted for an issue to publish the artices against; if you're importing a document with a root node of <issue> or <issues>, the issue(s) will be created and the articles will be scheduled against them.

Are you sure that your import completed successfully? Any error messages should be displayed at the time of import.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8329
Joined: Wed Aug 10, 2005 12:56 pm

Postby Sherman » Thu Dec 22, 2005 11:06 am

asmecher wrote:You can delete submissions by archiving them (see submission the summary page as Editor) and then deleting them from the archives.


And darn it, I can't figure out how to delete them from the archives.
Sherman
 
Posts: 60
Joined: Sat Dec 10, 2005 8:18 pm
Location: Tampa, FL

Postby asmecher » Thu Dec 22, 2005 12:37 pm

Hmm... Sherman, are you using the most recent version of OJS (currently 2.0.2-1)? If not, try upgrading -- the process is painless, and you may find that your problems are solved.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8329
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], ojsearch and 1 guest