Skip to content

Commit

Permalink
fix problems displaying oai in various formats (#653)
Browse files Browse the repository at this point in the history
fixed wrong number of parameters expected in java code
and wrong number of parameters sent in xsl file
  • Loading branch information
MajoBerger authored May 13, 2024
1 parent 5e9d2d4 commit a9d6622
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ final public SequenceType getResultType() {
final public SequenceType[] getArgumentTypes() {
return new SequenceType[]{
SequenceType.makeSequenceType(
ItemType.STRING, OccurrenceIndicator.ONE)};
ItemType.STRING, OccurrenceIndicator.ZERO_OR_MORE)};
}

@Override
Expand Down
16 changes: 8 additions & 8 deletions dspace/config/crosswalks/oai/metadataFormats/metasharev2.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
</xsl:when>
<xsl:when
test="doc:metadata/doc:element[@name='local']/doc:element[@name='contact']/doc:element[@name='person']/doc:element/doc:field[@name='value']">
<xsl:value-of select="tokenize(doc:metadata/doc:element[@name='local']/doc:element[@name='contact']/doc:element[@name='person']/doc:element/doc:field[@name='value'], ';')[2]"/>
<xsl:value-of select="tokenize(doc:metadata/doc:element[@name='local']/doc:element[@name='contact']/doc:element[@name='person']/doc:element/doc:field[@name='value'][1], ';')[2]"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="fn:logMissing('surname',$handle)" />
Expand All @@ -155,7 +155,7 @@
</xsl:when>
<xsl:when
test="doc:metadata/doc:element[@name='local']/doc:element[@name='contact']/doc:element[@name='person']/doc:element/doc:field[@name='value']">
<xsl:value-of select="tokenize(doc:metadata/doc:element[@name='local']/doc:element[@name='contact']/doc:element[@name='person']/doc:element/doc:field[@name='value'], ';')[1]"/>
<xsl:value-of select="tokenize(doc:metadata/doc:element[@name='local']/doc:element[@name='contact']/doc:element[@name='person']/doc:element/doc:field[@name='value'][1], ';')[1]"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="fn:logMissing('givenName',$handle)" />
Expand All @@ -178,7 +178,7 @@
test="doc:metadata/doc:element[@name='local']/doc:element[@name='contact']/doc:element[@name='person']/doc:element/doc:field[@name='value']">
<ms:affiliation>
<ms:organizationName>
<xsl:value-of select="tokenize(doc:metadata/doc:element[@name='local']/doc:element[@name='contact']/doc:element[@name='person']/doc:element/doc:field[@name='value'], ';')[4]" />
<xsl:value-of select="tokenize(doc:metadata/doc:element[@name='local']/doc:element[@name='contact']/doc:element[@name='person']/doc:element/doc:field[@name='value'][1], ';')[4]" />
</ms:organizationName>
<!--another communicationInfo needed -->
<xsl:call-template name="CommunicationInfo" />
Expand All @@ -199,7 +199,7 @@
</xsl:when>
<xsl:when
test="doc:metadata/doc:element[@name='local']/doc:element[@name='contact']/doc:element[@name='person']/doc:element/doc:field[@name='value']">
<xsl:value-of select="tokenize(doc:metadata/doc:element[@name='local']/doc:element[@name='contact']/doc:element[@name='person']/doc:element/doc:field[@name='value'], ';')[3]"/>
<xsl:value-of select="tokenize(doc:metadata/doc:element[@name='local']/doc:element[@name='contact']/doc:element[@name='person']/doc:element/doc:field[@name='value'][1], ';')[3]"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="fn:logMissing('email',$handle)" />
Expand Down Expand Up @@ -251,7 +251,7 @@
<xsl:when test="$fundingProjectNameCount = $fundingTypeCount and $fundingProjectNameCount &gt; 0">
<ms:resourceCreationInfo>
<xsl:choose>
<xsl:when test="not(starts-with(doc:metadata/doc:element[@name='metashare']/doc:element[@name='ResourceInfo#ResourceCreationInfo#FundingInfo#ProjectInfo']/doc:element[@name='projectName']/doc:element/doc:field[@name='value'],'#'))">
<xsl:when test="not(starts-with(doc:metadata/doc:element[@name='metashare']/doc:element[@name='ResourceInfo#ResourceCreationInfo#FundingInfo#ProjectInfo']/doc:element[@name='projectName']/doc:element/doc:field[@name='value'][1],'#'))">
<ms:fundingProject>
<ms:projectName>
<xsl:value-of select="doc:metadata/doc:element[@name='metashare']/doc:element[@name='ResourceInfo#ResourceCreationInfo#FundingInfo#ProjectInfo']/doc:element[@name='projectName']/doc:element/doc:field[@name='value']"/>
Expand All @@ -270,7 +270,7 @@
<ms:projectName>
<xsl:value-of select="$projectName" />
</ms:projectName>
<xsl:variable name="funding" select="substring-after(/doc:metadata/doc:element[@name='metashare']/doc:element[@name='ResourceInfo#ResourceCreationInfo#FundingInfo#ProjectInfo']/doc:element[@name='fundingType']/doc:element/doc:field[@name='value'][starts-with(.,$compId)],'-')"/>
<xsl:variable name="funding" select="substring-after(/doc:metadata/doc:element[@name='metashare']/doc:element[@name='ResourceInfo#ResourceCreationInfo#FundingInfo#ProjectInfo']/doc:element[@name='fundingType']/doc:element/doc:field[@name='value'][starts-with(.,$compId)][1],'-')"/>
<xsl:call-template name="FundingType">
<xsl:with-param name="funding" select="$funding"/>
</xsl:call-template>
Expand Down Expand Up @@ -456,7 +456,7 @@
</xsl:when>
<xsl:when
test="doc:metadata/doc:element[@name='local']/doc:element[@name='size']/doc:element[@name='info']/doc:element/doc:field[@name='value']">
<xsl:value-of select="tokenize(doc:metadata/doc:element[@name='local']/doc:element[@name='size']/doc:element[@name='info']/doc:element/doc:field[@name='value'], ';')[1]"/>
<xsl:value-of select="tokenize(doc:metadata/doc:element[@name='local']/doc:element[@name='size']/doc:element[@name='info']/doc:element/doc:field[@name='value'][1], ';')[1]"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="iJustWantToLog" select="fn:logMissing('size',$handle)" />
Expand All @@ -473,7 +473,7 @@
</xsl:when>
<xsl:when
test="doc:metadata/doc:element[@name='local']/doc:element[@name='size']/doc:element[@name='info']/doc:element/doc:field[@name='value']">
<xsl:value-of select="tokenize(doc:metadata/doc:element[@name='local']/doc:element[@name='size']/doc:element[@name='info']/doc:element/doc:field[@name='value'], ';')[2]"/>
<xsl:value-of select="tokenize(doc:metadata/doc:element[@name='local']/doc:element[@name='size']/doc:element[@name='info']/doc:element/doc:field[@name='value'][1], ';')[2]"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="iJustWantToLog" select="fn:logMissing('size',$handle)" />
Expand Down

0 comments on commit a9d6622

Please sign in to comment.