OJS development discussion, enhancement requests, third-party patches and plug-ins.
Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher
The OJS Technical Reference
and the OJS API Reference
are both available from the OJS Documentation
You can access our public Git Repository here
. Comprehensive Git usage instructions are available on the wiki
You can access our Bugzilla report tracker here
You can use our Google Custom Search
to search across our main website, the support forum, and Bugzilla.
Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion
subforum; if you have a technical support question, try the OJS Technical Support
I am currently working to implement a Journal import/export feature for OJS and I have a few different paths that I can go down to automate this process:
1) I can work with a database dump from OJS. I would start by using the command "mysqldump -X" to export the db to XML. Then I can develop an XSLT Stylesheet to transform the XML to a format similar to the DTD for articles/issues used by the current import/export plugin. I would have to develop a new Importer Plugin to handle Journal data such as article edit histories, Journal customization/settings, etc. The downside I see to this method would be from a user stand point, a person using my code has to find a way to do an XML database dump. And the only way I found was to have admin privileges and run command line statements (mysqldump) from the server terminal. The upside I see would be maintaining a stylesheet might be better than maintaining php code.
2) I can develop an Export Plugin for OJS that can be run from the web to generate XML, much like the article/issue exporter plugin does. Would it be possible for a plugin to gather all necessary Journal data? Or would further development be needed on the OJS side to access data?
3) I found the code for tools/dbXMLtoSQL.php. The DTD for this looks similar to the XML generated from a database dump. Would this tool be suitable for importing Journal data from a database dump?
Which of these solutions do you see more value in for the long run? In terms of automation, maintenance, usability, etc.
- Posts: 28
- Joined: Tue Nov 25, 2008 11:59 am
The best way to go about this (i.e. the best platform and version agnostic) would probably be to write a plugin based off of the native import/export plugin (and also perhaps including code from the user import/export plugin). You should be able to gather all information on the journal via the various DAOs in the code, and use the same DAOs to insert data extracted from XML. You'll have to be sure to cover all of the necessary objects to maintain data consistency--I'd suggest taking a look at the Doxygen documentation of OJS to get a good understanding of the relationships between objects in OJS.
If you want to import/export the journal's stylesheet, you could be able to do write file copying/creation operations to copy the stylesheet into the XML and out of the XML into a new stylesheet.
Let us know how it goes, and we hope you'd be willing to contribute you work back to the community!
- Posts: 952
- Joined: Mon May 05, 2008 10:29 am
- Location: Vancouver, BC
Return to OJS Development
Who is online
Users browsing this forum: Google [Bot] and 2 guests