Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions test/data/software/OpenAire-software-reference.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<datacite:titles>
<datacite:title>SuperLU-DIST</datacite:title>
</datacite:titles>
<dc:description xml:lang="en" descriptionType="Abstract">zbMATH Open Web Interface contents unavailable due to conflicting licenses.</dc:description>
<datacite:subjects>
<datacite:subject subjectScheme="msc2020">35</datacite:subject>
<datacite:subject subjectScheme="msc2020">65</datacite:subject>
Expand Down Expand Up @@ -173,7 +172,5 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or
</datacite:rightsList>
<dc:format>application/xml</dc:format>
<dc:language>eng</dc:language>
<dc:source>zbMATH Open Web Interface contents unavailable due to conflicting licenses.</dc:source>
<oaire:citationTitle>zbMATH Open Web Interface contents unavailable due to conflicting licenses.</oaire:citationTitle>
<datacite:date dateType="Issued">2003</datacite:date>
</resource>
12 changes: 6 additions & 6 deletions xslt/articles/xslt-article-Datacite.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,21 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or
</xsl:template>
<!-- Template for processing the rest of the identifiers of our Metadata and considered as alternative identifiers-->
<xsl:template match="identifier">
<xsl:if test="normalize-space(.) != '' and . != 'None'and . != 'none'">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none'">
<alternateIdentifier alternateIdentifierType="zbMATH Identifier">
<xsl:value-of select="."/>
</alternateIdentifier>
</xsl:if>
</xsl:template>
<xsl:template match="id">
<xsl:if test="normalize-space(.) != '' and . != 'None'and . != 'none'">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none'">
<alternateIdentifier alternateIdentifierType="zbMATH Document ID">
<xsl:value-of select="."/>
</alternateIdentifier>
</xsl:if>
</xsl:template>
<xsl:template match="zbmath_url">
<xsl:if test="normalize-space(.) != '' and . != 'None'and . != 'none'">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none'">
<alternateIdentifier alternateIdentifierType="URL">
<xsl:value-of select="."/>
</alternateIdentifier>
Expand Down Expand Up @@ -223,7 +223,7 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or
<xsl:attribute name="resourceTypeGeneral">Book</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="resourceTypeGeneral">Other</xsl:attribute>
<xsl:attribute name="resourceTypeGeneral">:none</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="."/>
Expand Down Expand Up @@ -323,7 +323,7 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or
<!-- Template for processing MSC (Mathematics Subject Classification)
transforming all its values -->
<xsl:template match="msc">
<xsl:if test="normalize-space(.) != '' and . != 'None'and . != 'none'">
<xsl:if test="normalize-space(.) != '' and . != 'None'and . != 'none' and not(contains(., 'zbMATH Open Web Interface contents unavailable due to conflicting licenses'))">
<subject>
<xsl:attribute name="subjectScheme">
<xsl:value-of select="scheme"/>
Expand All @@ -338,7 +338,7 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or


<xsl:template match="keywords">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none'">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none' and not(contains(., 'zbMATH Open Web Interface contents unavailable due to conflicting licenses'))">

<subject subjectScheme="keyword">
<xsl:value-of select="."/>
Expand Down
11 changes: 6 additions & 5 deletions xslt/articles/xslt-article-OpenAire2.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or
</xsl:template>

<xsl:template match="root/links">
<xsl:if test="normalize-space(.) != '' and . != 'None'and . != 'none'">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none'">
<xsl:choose>
<!-- Process the first 'links' node that has a 'doi' identifier -->
<xsl:when test="self::links[type = 'doi' and normalize-space(identifier) != ''][1]">
Expand Down Expand Up @@ -177,16 +177,17 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or
</xsl:template>

<xsl:template match="text">
<xsl:if test="normalize-space(.) != '' and . != 'None'and . != 'none'">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none'">
<dc:description descriptionType="Abstract">

<xsl:value-of select="normalize-space(.)"/>

</dc:description>
</xsl:if>
</xsl:template>

<xsl:template match="msc">
<xsl:if test="normalize-space(.) != '' and . != 'None'and . != 'none'">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none' and not(contains(., 'zbMATH Open Web Interface contents unavailable due to conflicting licenses'))">
<datacite:subject>
<xsl:attribute name="subjectScheme">
<xsl:value-of select="scheme"/>
Expand All @@ -200,7 +201,7 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or
</xsl:template>

<xsl:template match="keywords">
<xsl:if test="normalize-space(.) != '' and . != 'None'and . != 'none'">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none' and not(contains(., 'zbMATH Open Web Interface contents unavailable due to conflicting licenses'))">
<datacite:subject subjectScheme="keyword">
<xsl:value-of select="."/>
</datacite:subject>
Expand Down Expand Up @@ -235,7 +236,7 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or


<xsl:template match="publisher">
<xsl:if test="normalize-space(.) != '' and . != 'None'and . != 'none'">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none'">
<dc:publisher>
<xsl:value-of select="."/>
</dc:publisher>
Expand Down
12 changes: 6 additions & 6 deletions xslt/software/xslt-software-OpenAire.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -135,31 +135,31 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or
</xsl:template>

<xsl:template match="license_terms">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none'">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none' and not(contains(., 'zbMATH Open Web Interface contents unavailable due to conflicting licenses'))">
<oaire:licenseCondition>
<xsl:value-of select="."/>
</oaire:licenseCondition>
</xsl:if>
</xsl:template>

<xsl:template match="description">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none'">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none' and not(contains(., 'zbMATH Open Web Interface contents unavailable due to conflicting licenses'))">
<dc:description xml:lang="en" descriptionType="Abstract">
<xsl:value-of select="."/>
</dc:description>
</xsl:if>
</xsl:template>

<xsl:template match="classification">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none'">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none' and not(contains(., 'zbMATH Open Web Interface contents unavailable due to conflicting licenses'))">
<datacite:subject subjectScheme="msc2020" >
<xsl:value-of select="."/>
</datacite:subject>
</xsl:if>
</xsl:template>

<xsl:template match="keywords">
<xsl:if test="normalize-space(.) != '' and . != 'None'and . != 'none'">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none' and not(contains(., 'zbMATH Open Web Interface contents unavailable due to conflicting licenses'))">
<!-- Transformation of keywords -->
<datacite:subject subjectScheme="keyword">
<xsl:value-of select="."/>
Expand All @@ -170,15 +170,15 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or


<xsl:template match="source">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none'">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none' and not(contains(., 'zbMATH Open Web Interface contents unavailable due to conflicting licenses'))">
<dc:source>
<xsl:value-of select="."/>
</dc:source>
</xsl:if>
</xsl:template>

<xsl:template match="title">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none'">
<xsl:if test="normalize-space(.) != '' and . != 'None' and . != 'none' and not(contains(., 'zbMATH Open Web Interface contents unavailable due to conflicting licenses'))">
<oaire:citationTitle>
<xsl:value-of select="."/>
</oaire:citationTitle>
Expand Down
29 changes: 23 additions & 6 deletions xslt/software/xslt-software-datacite.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,17 @@
</xsl:if>
</xsl:template>

<xsl:template match="homepage">
<relatedIdentifier relatedIdentifierType="URL" relationType="IsSourceOf">
<xsl:template match="homepage">
<xsl:if test="normalize-space(.) != ''
and normalize-space(.) != 'none'
and normalize-space(.) != 'None'
and not(contains(., 'zbMATH Open Web Interface contents unavailable due to conflicting licenses'))">
<relatedIdentifier relatedIdentifierType="URL" relationType="IsSourceOf">
<xsl:value-of select="."/>
</relatedIdentifier>
</xsl:template>
</xsl:if>
</xsl:template>


<!-- Template to get the source code -->
<xsl:template name="sourceCode">
Expand All @@ -238,19 +244,30 @@


<xsl:template match="references">
<xsl:if test="normalize-space(.) != ''
and normalize-space(.) != 'none'
and normalize-space(.) != 'None'
and not(contains(., 'zbMATH Open Web Interface contents unavailable due to conflicting licenses'))">
<relatedIdentifier relatedIdentifierType="URL" relationType="IsCitedBy">
<xsl:text>https://api.zbmath.org/v1/document/</xsl:text>
<xsl:value-of select="."/>
</relatedIdentifier>
</xsl:if>
</xsl:template>

<xsl:template match="references_alt">
<xsl:variable name="reference" select="."/>
<xsl:call-template name="process-reference">
<xsl:with-param name="text" select="$reference"/>
</xsl:call-template>
<xsl:if test="normalize-space($reference) != ''
and normalize-space($reference) != 'none'
and normalize-space($reference) != 'None'
and not(contains($reference, 'zbMATH Open Web Interface contents unavailable due to conflicting licenses'))">
<xsl:call-template name="process-reference">
<xsl:with-param name="text" select="$reference"/>
</xsl:call-template>
</xsl:if>
</xsl:template>


<xsl:template name="process-reference">
<xsl:param name="text"/>
<xsl:choose>
Expand Down