setSpec

44 views
Skip to first unread message

Bobo Momcilovic

unread,
Apr 13, 2021, 11:52:40 AM4/13/21
to OAI-PMH
Hello,

The validator returned this error upon validation:

FAIL Expected setSpec was missing from the response. The GetRecord response for identifier oai:intechopen.com:1 did not contain a set specification for 3-86611-038-3

As far as I gathered, setSpec is not a necessary construct.
So, can our headers simply be without setSpec and pass the validation?

So, instead of:

 <header> 
 <identifier>oai:intechopen.com:1</identifier> 
 <datestamp>2005-07-01</datestamp> 
 <setSpec>3-86611-038-302005-07-01</setSpec> 
 </header>

can we do this?

 <header> 
 <identifier>oai:intechopen.com:1</identifier> 
 <datestamp>2005-07-01</datestamp> 
 </header>

John Salter

unread,
Apr 13, 2021, 12:06:47 PM4/13/21
to oai...@googlegroups.com

Hi Bobo,
There might be a bug in your code generating the setSpec tag.


I think the validator will check that a record belongs to a set, and the set contains the record. This is why it's looking for a set '
3-86611-038-3'.

The expected SetSpec was there in a way - but also had a zero and the datestamp append to the end of it:

 <setSpec>3-86611-038-302005-07-01</setSpec> 

Should have been:

 <setSpec>3-86611-038-3</setSpec> 

 

To me, this looks like some data being retained in a variable that's then output as the setSpec?

 

I hope that makes sense. If not, I'll try to explain again.

 

Cheers,

John

--

---
You received this message because you are subscribed to the Google Groups "OAI-PMH" group.
To unsubscribe from this group and stop receiving emails from it, send an email to oai-pmh+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/oai-pmh/d6cf0c13-baee-4e0c-9114-20d035c68da3n%40googlegroups.com.

Bobo Momcilovic

unread,
Apr 14, 2021, 11:24:41 AM4/14/21
to OAI-PMH
Hi John,

Yes, that's what I've noticed too. 

However, I thought that 
 
<setSpec>3-86611-038-3</setSpec> 

would have also resulted as an error.

We'll fix the bug and run the validation again.

Thank you John!

Cheers,
Bobo

John Salter

unread,
Apr 14, 2021, 12:57:50 PM4/14/21
to oai...@googlegroups.com
Hi Bobo,
To trace the data, look at the output of a 'ListSets' request  - something like:
    [your oai2 base url]?verb=ListSets
all your sets should be listed, including the setSpec below.

If you then request the identifiers or records in that set e.g.
    [your oai2 base url]?verb=ListIdentifiers&metadataPrefix=oai_dc&set=3-86611-038-3
    [your oai2 base url]?verb=ListRecords&metadataPrefix=oai_dc&set=3-86611-038-3
each identifier or record returned should also include a <setSpec>3-86611-038-3</setSpec> element (and other sets it belongs to).

If this isn't the case, the validation will fail.

Cheers,
John

From: oai...@googlegroups.com <oai...@googlegroups.com> on behalf of Bobo Momcilovic <smor...@gmail.com>
Sent: 14 April 2021 07:47
To: OAI-PMH <oai...@googlegroups.com>
Subject: Re: [OAI-PMH] setSpec
 
Reply all
Reply to author
Forward
0 new messages