Skip to content

Commit

Permalink
Merge pull request #17 from clarin-eric/issue16
Browse files Browse the repository at this point in the history
Set collection display name header based on provider name  (implements #16)
  • Loading branch information
twagoo authored Jan 6, 2025
2 parents 7545fad + c32cfe1 commit 54d76de
Show file tree
Hide file tree
Showing 117 changed files with 740 additions and 343 deletions.
450 changes: 262 additions & 188 deletions datacite-cmdi/datacite-cmdi.xpr

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions datacite-cmdi/datacite_to_cmdi-common.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@
</xsl:element>
</xsl:if>
</xsl:template>

<xsl:template name="collectionDisplayName">
<xsl:param name="collection_name" select="''"/>
<xsl:if test="normalize-space($collection_name)!=''">
<cmd:MdCollectionDisplayName>
<xsl:value-of select="$collection_name"/>
</cmd:MdCollectionDisplayName>
</xsl:if>
</xsl:template>

<xsl:function name="datacite_cmd:isAbsoluteUri">
<xsl:param name="value"/>
Expand Down
6 changes: 4 additions & 2 deletions datacite-cmdi/datacite_to_cmdi-kernel3.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<xsl:template match="resource" mode="root">
<cmd:CMD CMDVersion="1.2"
xsi:schemaLocation="http://www.clarin.eu/cmd/1 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/1.x/profiles/clarin.eu:cr1:p_1610707853541/xsd">
<xsl:apply-templates select="." mode="header-section"/>
<xsl:apply-templates select="." mode="header-section" />
<xsl:apply-templates select="." mode="resource-section"/>
<cmd:Components>
<DataCiteRecord>
Expand Down Expand Up @@ -109,7 +109,9 @@
<!-- Can we generate a selflink? -->
<!-- <cmd:MdSelfLink>http://www.oxygenxml.com/</cmd:MdSelfLink>-->
<cmd:MdProfile><xsl:value-of select="$cmdiProfileId"/></cmd:MdProfile>
<!--<cmd:MdCollectionDisplayName>MdCollectionDisplayName0</cmd:MdCollectionDisplayName>-->
<xsl:call-template name="collectionDisplayName">
<xsl:with-param name="collection_name" select="$collection_name" />
</xsl:call-template>
</cmd:Header>
</xsl:template>

Expand Down
6 changes: 4 additions & 2 deletions datacite-cmdi/datacite_to_cmdi-kernel4.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<xsl:template match="resource" mode="root">
<cmd:CMD CMDVersion="1.2"
xsi:schemaLocation="http://www.clarin.eu/cmd/1 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/1.x/profiles/clarin.eu:cr1:p_1610707853541/xsd">
<xsl:apply-templates select="." mode="header-section"/>
<xsl:apply-templates select="." mode="header-section" />
<xsl:apply-templates select="." mode="resource-section"/>
<cmd:Components>
<DataCiteRecord>
Expand Down Expand Up @@ -109,7 +109,9 @@
<!-- Can we generate a selflink? -->
<!-- <cmd:MdSelfLink>http://www.oxygenxml.com/</cmd:MdSelfLink>-->
<cmd:MdProfile><xsl:value-of select="$cmdiProfileId"/></cmd:MdProfile>
<!--<cmd:MdCollectionDisplayName>MdCollectionDisplayName0</cmd:MdCollectionDisplayName>-->
<xsl:call-template name="collectionDisplayName">
<xsl:with-param name="collection_name" select="$collection_name" />
</xsl:call-template>
</cmd:Header>
</xsl:template>

Expand Down
3 changes: 3 additions & 0 deletions datacite-cmdi/datacite_to_cmdi.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@

<xsl:output indent="yes"/>

<xsl:param name="provider_name" select="''"/>
<xsl:param name="collection_name" select="$provider_name"/>

<xsl:include href="datacite_to_cmdi-common.xsl"/>
<xsl:include href="datacite_to_cmdi-kernel3.xsl"/>
<xsl:include href="datacite_to_cmdi-kernel4.xsl"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xsi:schemaLocation="http://www.clarin.eu/cmd/1 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/1.x/profiles/clarin.eu:cr1:p_1610707853541/xsd">
<cmd:Header>
<cmd:MdProfile>clarin.eu:cr1:p_1610707853541</cmd:MdProfile>
<cmd:MdCollectionDisplayName>Trolling Dataverse OAI Provider</cmd:MdCollectionDisplayName>
</cmd:Header>
<cmd:Resources>
<cmd:ResourceProxyList>
Expand Down Expand Up @@ -333,7 +334,7 @@
<note>Conversion from DataCite (http://datacite.org/schema/kernel-4) to CMD (profile clarin.eu:cr1:p_1610707853541)</note>
<ActivityInfo>
<When>
<date>2021-07-20+03:00</date>
<date>2025-01-06+02:00</date>
</When>
</ActivityInfo>
</Activity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@
xsi:schemaLocation="http://www.clarin.eu/cmd/1 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/1.x/profiles/clarin.eu:cr1:p_1610707853541/xsd">
<cmd:Header>
<cmd:MdProfile>clarin.eu:cr1:p_1610707853541</cmd:MdProfile>
<cmd:MdCollectionDisplayName>Trolling Dataverse OAI Provider</cmd:MdCollectionDisplayName>
</cmd:Header>
<cmd:Resources>
<cmd:ResourceProxyList><!--Resource identifier cannot be converted to a ResourceRef: 10037.1/10138--></cmd:ResourceProxyList>
<cmd:ResourceProxyList>
<cmd:ResourceProxy id="d4e3">
<cmd:ResourceType>Resource</cmd:ResourceType>
<cmd:ResourceRef>https://hdl.handle.net/10037.1/10138</cmd:ResourceRef>
</cmd:ResourceProxy>
</cmd:ResourceProxyList>
<cmd:JournalFileProxyList/>
<cmd:ResourceRelationList/>
</cmd:Resources>
Expand Down Expand Up @@ -197,7 +203,7 @@
<note>Conversion from DataCite (http://datacite.org/schema/kernel-4) to CMD (profile clarin.eu:cr1:p_1610707853541)</note>
<ActivityInfo>
<When>
<date>2021-07-20+03:00</date>
<date>2025-01-06+02:00</date>
</When>
</ActivityInfo>
</Activity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xsi:schemaLocation="http://www.clarin.eu/cmd/1 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/1.x/profiles/clarin.eu:cr1:p_1610707853541/xsd">
<cmd:Header>
<cmd:MdProfile>clarin.eu:cr1:p_1610707853541</cmd:MdProfile>
<cmd:MdCollectionDisplayName>Trolling Dataverse OAI Provider</cmd:MdCollectionDisplayName>
</cmd:Header>
<cmd:Resources>
<cmd:ResourceProxyList>
Expand Down Expand Up @@ -223,7 +224,7 @@ Nesset, Tore (2018b): How to translate compounds into Russian? Scando-Slavica 64
<note>Conversion from DataCite (http://datacite.org/schema/kernel-4) to CMD (profile clarin.eu:cr1:p_1610707853541)</note>
<ActivityInfo>
<When>
<date>2021-07-20+03:00</date>
<date>2025-01-06+02:00</date>
</When>
</ActivityInfo>
</Activity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@
xsi:schemaLocation="http://www.clarin.eu/cmd/1 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/1.x/profiles/clarin.eu:cr1:p_1610707853541/xsd">
<cmd:Header>
<cmd:MdProfile>clarin.eu:cr1:p_1610707853541</cmd:MdProfile>
<cmd:MdCollectionDisplayName>Trolling Dataverse OAI Provider</cmd:MdCollectionDisplayName>
</cmd:Header>
<cmd:Resources>
<cmd:ResourceProxyList><!--Resource identifier cannot be converted to a ResourceRef: 10037.1/10020--></cmd:ResourceProxyList>
<cmd:ResourceProxyList>
<cmd:ResourceProxy id="d4e2">
<cmd:ResourceType>Resource</cmd:ResourceType>
<cmd:ResourceRef>https://hdl.handle.net/10037.1/10020</cmd:ResourceRef>
</cmd:ResourceProxy>
</cmd:ResourceProxyList>
<cmd:JournalFileProxyList/>
<cmd:ResourceRelationList/>
</cmd:Resources>
Expand Down Expand Up @@ -170,7 +176,7 @@ avily invested in compounding. Although this study is limited to three Indo-Euro
<note>Conversion from DataCite (http://datacite.org/schema/kernel-4) to CMD (profile clarin.eu:cr1:p_1610707853541)</note>
<ActivityInfo>
<When>
<date>2021-07-20+03:00</date>
<date>2025-01-06+02:00</date>
</When>
</ActivityInfo>
</Activity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@
xsi:schemaLocation="http://www.clarin.eu/cmd/1 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/1.x/profiles/clarin.eu:cr1:p_1610707853541/xsd">
<cmd:Header>
<cmd:MdProfile>clarin.eu:cr1:p_1610707853541</cmd:MdProfile>
<cmd:MdCollectionDisplayName>Trolling Dataverse OAI Provider</cmd:MdCollectionDisplayName>
</cmd:Header>
<cmd:Resources>
<cmd:ResourceProxyList><!--Resource identifier cannot be converted to a ResourceRef: 10037.1/10152--></cmd:ResourceProxyList>
<cmd:ResourceProxyList>
<cmd:ResourceProxy id="d4e2">
<cmd:ResourceType>Resource</cmd:ResourceType>
<cmd:ResourceRef>https://hdl.handle.net/10037.1/10152</cmd:ResourceRef>
</cmd:ResourceProxy>
</cmd:ResourceProxyList>
<cmd:JournalFileProxyList/>
<cmd:ResourceRelationList/>
</cmd:Resources>
Expand Down Expand Up @@ -171,7 +177,7 @@ s more generally, that are at problematic. Rather, it is our assumptions about t
<note>Conversion from DataCite (http://datacite.org/schema/kernel-4) to CMD (profile clarin.eu:cr1:p_1610707853541)</note>
<ActivityInfo>
<When>
<date>2021-07-20+03:00</date>
<date>2025-01-06+02:00</date>
</When>
</ActivityInfo>
</Activity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xsi:schemaLocation="http://www.clarin.eu/cmd/1 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/1.x/profiles/clarin.eu:cr1:p_1610707853541/xsd">
<cmd:Header>
<cmd:MdProfile>clarin.eu:cr1:p_1610707853541</cmd:MdProfile>
<cmd:MdCollectionDisplayName>Trolling Dataverse OAI Provider</cmd:MdCollectionDisplayName>
</cmd:Header>
<cmd:Resources>
<cmd:ResourceProxyList>
Expand Down Expand Up @@ -213,7 +214,7 @@ title="BNC" target="_blank"&gt;https://www.gov.uk/guidance/exceptions-to-copyrig
<note>Conversion from DataCite (http://datacite.org/schema/kernel-4) to CMD (profile clarin.eu:cr1:p_1610707853541)</note>
<ActivityInfo>
<When>
<date>2021-07-20+03:00</date>
<date>2025-01-06+02:00</date>
</When>
</ActivityInfo>
</Activity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@
xsi:schemaLocation="http://www.clarin.eu/cmd/1 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/1.x/profiles/clarin.eu:cr1:p_1610707853541/xsd">
<cmd:Header>
<cmd:MdProfile>clarin.eu:cr1:p_1610707853541</cmd:MdProfile>
<cmd:MdCollectionDisplayName>Trolling Dataverse OAI Provider</cmd:MdCollectionDisplayName>
</cmd:Header>
<cmd:Resources>
<cmd:ResourceProxyList><!--Resource identifier cannot be converted to a ResourceRef: 10037.1/10040--></cmd:ResourceProxyList>
<cmd:ResourceProxyList>
<cmd:ResourceProxy id="d4e2">
<cmd:ResourceType>Resource</cmd:ResourceType>
<cmd:ResourceRef>https://hdl.handle.net/10037.1/10040</cmd:ResourceRef>
</cmd:ResourceProxy>
</cmd:ResourceProxyList>
<cmd:JournalFileProxyList/>
<cmd:ResourceRelationList/>
</cmd:Resources>
Expand Down Expand Up @@ -187,7 +193,7 @@ cross different types shows that the number of indisputably non-Olbanian deviati
<note>Conversion from DataCite (http://datacite.org/schema/kernel-4) to CMD (profile clarin.eu:cr1:p_1610707853541)</note>
<ActivityInfo>
<When>
<date>2021-07-20+03:00</date>
<date>2025-01-06+02:00</date>
</When>
</ActivityInfo>
</Activity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xsi:schemaLocation="http://www.clarin.eu/cmd/1 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/1.x/profiles/clarin.eu:cr1:p_1610707853541/xsd">
<cmd:Header>
<cmd:MdProfile>clarin.eu:cr1:p_1610707853541</cmd:MdProfile>
<cmd:MdCollectionDisplayName>Trolling Dataverse OAI Provider</cmd:MdCollectionDisplayName>
</cmd:Header>
<cmd:Resources>
<cmd:ResourceProxyList>
Expand Down Expand Up @@ -219,7 +220,7 @@
<note>Conversion from DataCite (http://datacite.org/schema/kernel-4) to CMD (profile clarin.eu:cr1:p_1610707853541)</note>
<ActivityInfo>
<When>
<date>2021-07-20+03:00</date>
<date>2025-01-06+02:00</date>
</When>
</ActivityInfo>
</Activity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xsi:schemaLocation="http://www.clarin.eu/cmd/1 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/1.x/profiles/clarin.eu:cr1:p_1610707853541/xsd">
<cmd:Header>
<cmd:MdProfile>clarin.eu:cr1:p_1610707853541</cmd:MdProfile>
<cmd:MdCollectionDisplayName>Trolling Dataverse OAI Provider</cmd:MdCollectionDisplayName>
</cmd:Header>
<cmd:Resources>
<cmd:ResourceProxyList>
Expand Down Expand Up @@ -1943,7 +1944,7 @@
<note>Conversion from DataCite (http://datacite.org/schema/kernel-4) to CMD (profile clarin.eu:cr1:p_1610707853541)</note>
<ActivityInfo>
<When>
<date>2021-07-20+03:00</date>
<date>2025-01-06+02:00</date>
</When>
</ActivityInfo>
</Activity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@
xsi:schemaLocation="http://www.clarin.eu/cmd/1 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/1.x/profiles/clarin.eu:cr1:p_1610707853541/xsd">
<cmd:Header>
<cmd:MdProfile>clarin.eu:cr1:p_1610707853541</cmd:MdProfile>
<cmd:MdCollectionDisplayName>Trolling Dataverse OAI Provider</cmd:MdCollectionDisplayName>
</cmd:Header>
<cmd:Resources>
<cmd:ResourceProxyList><!--Resource identifier cannot be converted to a ResourceRef: 10037.1/10158--></cmd:ResourceProxyList>
<cmd:ResourceProxyList>
<cmd:ResourceProxy id="d4e2">
<cmd:ResourceType>Resource</cmd:ResourceType>
<cmd:ResourceRef>https://hdl.handle.net/10037.1/10158</cmd:ResourceRef>
</cmd:ResourceProxy>
</cmd:ResourceProxyList>
<cmd:JournalFileProxyList/>
<cmd:ResourceRelationList/>
</cmd:Resources>
Expand Down Expand Up @@ -180,7 +186,7 @@
<note>Conversion from DataCite (http://datacite.org/schema/kernel-4) to CMD (profile clarin.eu:cr1:p_1610707853541)</note>
<ActivityInfo>
<When>
<date>2021-07-20+03:00</date>
<date>2025-01-06+02:00</date>
</When>
</ActivityInfo>
</Activity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xsi:schemaLocation="http://www.clarin.eu/cmd/1 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/1.x/profiles/clarin.eu:cr1:p_1610707853541/xsd">
<cmd:Header>
<cmd:MdProfile>clarin.eu:cr1:p_1610707853541</cmd:MdProfile>
<cmd:MdCollectionDisplayName>Trolling Dataverse OAI Provider</cmd:MdCollectionDisplayName>
</cmd:Header>
<cmd:Resources>
<cmd:ResourceProxyList>
Expand Down Expand Up @@ -169,7 +170,7 @@ The data set includes all the instances of the completive reflexive found in the
<note>Conversion from DataCite (http://datacite.org/schema/kernel-4) to CMD (profile clarin.eu:cr1:p_1610707853541)</note>
<ActivityInfo>
<When>
<date>2021-07-20+03:00</date>
<date>2025-01-06+02:00</date>
</When>
</ActivityInfo>
</Activity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@
xsi:schemaLocation="http://www.clarin.eu/cmd/1 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/1.x/profiles/clarin.eu:cr1:p_1610707853541/xsd">
<cmd:Header>
<cmd:MdProfile>clarin.eu:cr1:p_1610707853541</cmd:MdProfile>
<cmd:MdCollectionDisplayName>Trolling Dataverse OAI Provider</cmd:MdCollectionDisplayName>
</cmd:Header>
<cmd:Resources>
<cmd:ResourceProxyList><!--Resource identifier cannot be converted to a ResourceRef: 10037.1/10294--></cmd:ResourceProxyList>
<cmd:ResourceProxyList>
<cmd:ResourceProxy id="d4e2">
<cmd:ResourceType>Resource</cmd:ResourceType>
<cmd:ResourceRef>https://hdl.handle.net/10037.1/10294</cmd:ResourceRef>
</cmd:ResourceProxy>
</cmd:ResourceProxyList>
<cmd:JournalFileProxyList/>
<cmd:ResourceRelationList/>
</cmd:Resources>
Expand Down Expand Up @@ -203,7 +209,7 @@
<note>Conversion from DataCite (http://datacite.org/schema/kernel-4) to CMD (profile clarin.eu:cr1:p_1610707853541)</note>
<ActivityInfo>
<When>
<date>2021-07-20+03:00</date>
<date>2025-01-06+02:00</date>
</When>
</ActivityInfo>
</Activity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xsi:schemaLocation="http://www.clarin.eu/cmd/1 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/1.x/profiles/clarin.eu:cr1:p_1610707853541/xsd">
<cmd:Header>
<cmd:MdProfile>clarin.eu:cr1:p_1610707853541</cmd:MdProfile>
<cmd:MdCollectionDisplayName>Trolling Dataverse OAI Provider</cmd:MdCollectionDisplayName>
</cmd:Header>
<cmd:Resources>
<cmd:ResourceProxyList>
Expand Down Expand Up @@ -169,7 +170,7 @@
<note>Conversion from DataCite (http://datacite.org/schema/kernel-4) to CMD (profile clarin.eu:cr1:p_1610707853541)</note>
<ActivityInfo>
<When>
<date>2021-07-20+03:00</date>
<date>2025-01-06+02:00</date>
</When>
</ActivityInfo>
</Activity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xsi:schemaLocation="http://www.clarin.eu/cmd/1 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/1.x/profiles/clarin.eu:cr1:p_1610707853541/xsd">
<cmd:Header>
<cmd:MdProfile>clarin.eu:cr1:p_1610707853541</cmd:MdProfile>
<cmd:MdCollectionDisplayName>Trolling Dataverse OAI Provider</cmd:MdCollectionDisplayName>
</cmd:Header>
<cmd:Resources>
<cmd:ResourceProxyList>
Expand Down Expand Up @@ -181,7 +182,7 @@
<note>Conversion from DataCite (http://datacite.org/schema/kernel-4) to CMD (profile clarin.eu:cr1:p_1610707853541)</note>
<ActivityInfo>
<When>
<date>2021-07-20+03:00</date>
<date>2025-01-06+02:00</date>
</When>
</ActivityInfo>
</Activity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xsi:schemaLocation="http://www.clarin.eu/cmd/1 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/1.x/profiles/clarin.eu:cr1:p_1610707853541/xsd">
<cmd:Header>
<cmd:MdProfile>clarin.eu:cr1:p_1610707853541</cmd:MdProfile>
<cmd:MdCollectionDisplayName>Trolling Dataverse OAI Provider</cmd:MdCollectionDisplayName>
</cmd:Header>
<cmd:Resources>
<cmd:ResourceProxyList>
Expand Down Expand Up @@ -220,7 +221,7 @@ analyses addressing which aspects of the determinerless occurrences can be attri
<note>Conversion from DataCite (http://datacite.org/schema/kernel-4) to CMD (profile clarin.eu:cr1:p_1610707853541)</note>
<ActivityInfo>
<When>
<date>2021-07-20+03:00</date>
<date>2025-01-06+02:00</date>
</When>
</ActivityInfo>
</Activity>
Expand Down
Loading

0 comments on commit 54d76de

Please sign in to comment.