Skip to content

Commit 3d7802d

Browse files
authored
Update error handling in Main.xml for OAI-PMH
Add verb: "identify" because in some (cached) cases the empty object {} is interpreted as string and causes an error
1 parent 52ffe4b commit 3d7802d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • Resources/Private/Templates/OaiPmh

Resources/Private/Templates/OaiPmh/Main.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
1717
<responseDate><f:format.date format="Y-m-d\TH:i:s\Z">now</f:format.date></responseDate>
1818
<f:comment>As per the specification, don't show arguments on badVerb or badArgument.</f:comment>
19-
{f:if(condition: '{error} == "badVerb" || {error} == "badArgument"', then: '{}', else: '{parameters}') -> f:variable(name: 'shownParameters')}
19+
{f:if(condition: '{error} == "badVerb" || {error} == "badArgument"', then: '{verb: "identify"}', else: '{parameters}') -> f:variable(name: 'shownParameters')}
2020
<request{f:if(condition: i.isFirst, then: ' {key}="{value}"', else: ' {key}="{value}"') -> f:for(each:'{shownParameters}', as:'value', key:'key', iteration:'i')}><f:uri.page absolute="1" /></request>
2121
<f:if condition="{error}">
2222
<f:then>

0 commit comments

Comments
 (0)