OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



How to catch XML's attribute of elements in PKP Harvester?

General inquiries about the PKP.

Moderators: jmacgreg, btbell, michael, bdgregg, vgabler, barbarah, John

Forum rules
Feel free to post general inquiries about the PKP Here. We'll also post notes of interest from time to time. You may also want to check out the PKP blog.

How to catch XML's attribute of elements in PKP Harvester?

Postby sophonie » Tue Dec 01, 2009 8:25 am

Hi,
In PKP Harvester this url http://harvester.aquitaine.fr/index.php/record/view/268
the fields locinsee and Références géospatiales are empty but in the OAI Repository
a value is in. In fact this value is an attribute of these elements so that
<ap:locinsee code_insee="33254"/>
<ap:spatial latitude="0.425698" longitude="32.14587"/>

I want show these values in PKP Harvester. But How to configure PKP for catch theses attributes?
Thanks.
Sophonie
sophonie
 
Posts: 12
Joined: Wed Apr 15, 2009 6:44 am

Re: How to catch XML's attribute of elements in PKP Harvester?

Postby asmecher » Thu Dec 10, 2009 10:51 am

Hi Sophonie,

Are you handy with MySQL? I'd suggest checking the records table to see what data is there. Find the record_id from in URL while browsing one of the records in question, then use the record_id (e.g. 12345 below) to query the records table:
Code: Select all
SELECT contents FROM records WHERE record_id = 12345;
If you see the missing data there, it's been harvested OK but is probably not being processed. Next check the parsed_contents field:
Code: Select all
SELECT parsed_contents FROM records WHERE record_id = 12345;
If the data appears in the first field but not the second, you'll need to look at the DublinCorePlugin (implemented in plugins/schemas/dc/DublinCorePlugin.inc.php). Specifically, look at the parseContents function, which turns the raw XML (as contained in "contents") into a more compact format that's used for presenting the data (as contained in "parsed_contents").

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


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests