You are viewing the PKP Support Forum | PKP Home Wiki

Batch import XML galley file problem?

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
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.

Batch import XML galley file problem?

Postby nhomenda » Fri Jun 28, 2013 6:56 am

Hello- I need to batch upload back issues of a journal where the articles are encoded in TEI-XML and as PDF. I am able to use the Articles & Issues XML plugin to successfully import all of this.

Once the XML articles are in OJS, I would like them to display as XHTML. I made a simple XSL file that produces valid XHTML output and uploaded it to the XML Galley plugin. In testing, I was able to get the desired XHTML output for an XML galley that I pushed through the editorial process.

My next test is where I ran into the problem. Once my XSL was in the plugin, I tried batch uploading a couple of articles with XML galleys. They uploaded, but they do not display as XHTML. Instead, the browser downloads them as .txt files. I am using the application/xml mime type. I have encountered the same behavior when using the QuickSubmit plugin, so maybe it's the XML galley plugin giving me trouble? Is there any way to make this work?

Many thanks in advance for your help.

Indiana University
Posts: 1
Joined: Fri Jun 28, 2013 6:25 am

Re: Batch import XML galley file problem?

Postby asmecher » Fri Jun 28, 2013 8:13 am

Hi Nick,

The XML galley plugin doesn't play all that well with the import/export plugin -- XML galleys have an additional table in the database (called article_xml_galleys) that the XML import does not populate. The easiest thing to do is probably to import the articles, then manually add the article_xml_galleys entries to go with them.

Alec Smecher
Public Knowledge Project Team
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: Batch import XML galley file problem?

Postby jhallida » Tue Sep 10, 2013 12:37 pm

I'm just following up on this issue (I work with the original poster.) We have discovered that everything works perfectly fine, with no database mangling necessary, as long as the MIME type for the imported files is specified as "text/xml", and not "application/xml". If this is the case, the two plugins work just fine together. We had been specifying '"application/xml", and this was causing the problems.

- Jim Halliday
Posts: 24
Joined: Fri Aug 20, 2010 8:03 am

Re: Batch import XML galley file problem?

Postby ctgraham » Thu Feb 26, 2015 12:20 pm

@jhalilida, @nhomenda,

Did you use an XSLT to create the native XML import from the TEI?

Or has anyone else? I have TEI-XML with article information that I would love to transform to conform to the native.dtd and would prefer not to recreate an existing wheel.

Posts: 240
Joined: Thu Apr 03, 2014 5:29 am
Location: Pitt ULS

Return to OJS Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests