Skip to content

Commit

Permalink
Only use dc:type if there isn't any dc:type with a @xsi:type.
Browse files Browse the repository at this point in the history
  • Loading branch information
menzowindhouwer committed Jan 31, 2018
1 parent da7ec3f commit 5642693
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions olac-cmdi/olac2cmdi.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,21 @@
</type>
</xsl:template>


<xsl:template match="//dc:type" priority="1" mode="cmd">
<xsl:template match="//dc:type[normalize-space(@xsi:type)!='']" priority="1" mode="cmd">
<type>
<xsl:apply-templates select="@xsi:type" mode="#current"/>
<xsl:value-of select="."/>
</type>
</xsl:template>

<xsl:template match="//dc:type" priority="0" mode="cmd">
<xsl:if test="empty(../dc:type[normalize-space(@xsi:type)!=''])">
<type>
<xsl:value-of select="."/>
</type>
</xsl:if>
</xsl:template>

<xsl:template match="@xml:lang" mode="cmd">
<xsl:attribute name="xml:lang">
<xsl:value-of select="."/>
Expand Down

0 comments on commit 5642693

Please sign in to comment.