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
The Public Knowledge Project Support Forum is moving to

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: 12
Joined: Wed Apr 15, 2009 6:44 am

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

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

In PKP Harvester this url
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?

Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

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/ 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").

Alec Smecher
Public Knowledge Project Team

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest