Skip to content

Commit

Permalink
including keywords as taglists
Browse files Browse the repository at this point in the history
  • Loading branch information
tillgrallert committed Apr 21, 2024
1 parent ed4d114 commit 8f7d999
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
24 changes: 24 additions & 0 deletions xslt/convert_tei-to-biblstruct_functions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -548,10 +548,34 @@
</imprint>
<xsl:apply-templates mode="m_fileDesc-to-biblStruct" select="$v_publicationStmt/tei:idno[@type = ('volume', 'issue')]"/>
</monogr>
<!-- add keywords from profileDesc -->
<xsl:apply-templates select="following-sibling::tei:profileDesc/tei:textClass" mode="m_fileDesc-to-biblStruct"/>
</biblStruct>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template mode="m_fileDesc-to-biblStruct" match="tei:textClass">
<note type="tagList">
<xsl:apply-templates select="tei:keywords" mode="m_fileDesc-to-biblStruct"/>
</note>
</xsl:template>
<xsl:template mode="m_fileDesc-to-biblStruct" match="tei:keywords">
<list>
<xsl:apply-templates select="@scheme | @n" mode="m_fileDesc-to-biblStruct"/>
<xsl:apply-templates select="tei:term" mode="m_fileDesc-to-biblStruct"/>
</list>
</xsl:template>
<xsl:template mode="m_fileDesc-to-biblStruct" match="tei:term">
<item>
<xsl:value-of select="normalize-space(.)"/>
</item>
</xsl:template>
<xsl:template mode="m_fileDesc-to-biblStruct" match="@scheme">
<xsl:attribute name="source" select="."/>
</xsl:template>
<xsl:template mode="m_fileDesc-to-biblStruct" match="@n">
<xsl:attribute name="type" select="."/>
</xsl:template>
<xsl:template match="tei:idno[@type = ('volume', 'issue')]" mode="m_fileDesc-to-biblStruct">
<biblScope unit="{@type}">
<xsl:choose>
Expand Down
9 changes: 8 additions & 1 deletion xslt/convert_tei-to-mods_functions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@
<xsl:text>text</xsl:text>
</typeOfResource>
<xsl:choose>
<xsl:when test="$v_analytic/tei:title[@level = 'a'] and $v_biblStruct/tei:biblStruct/tei:note[@type = 'tagList']/tei:list[@type = 'category']/tei:item[matches(text(), 'vortrag', 'i')]">
<genre authority="local" xml:lang="en">presentation</genre>
<!-- <genre authority="marcgt" xml:lang="en">article</genre>-->
</xsl:when>
<xsl:when test="$v_analytic/tei:title[@level = 'a']">
<genre authority="local" xml:lang="en">journalArticle</genre>
<genre authority="marcgt" xml:lang="en">article</genre>
Expand Down Expand Up @@ -320,7 +324,7 @@
</xsl:otherwise>
</xsl:choose>
<!-- notes, tags etc. -->
<xsl:apply-templates mode="m_tei-to-mods" select="$v_biblStruct/tei:note"/>
<xsl:apply-templates mode="m_tei-to-mods" select="$v_biblStruct/tei:biblStruct//tei:note"/>
</mods>
</xsl:function>
<!-- transform TEI names to MODS -->
Expand Down Expand Up @@ -566,6 +570,9 @@
<xsl:when test="tei:persName">
<xsl:apply-templates mode="m_tei-to-mods" select="tei:persName"/>
</xsl:when>
<xsl:when test="tei:name">
<xsl:apply-templates mode="m_tei-to-mods" select="tei:name"/>
</xsl:when>
<xsl:otherwise>
<namePart>
<xsl:variable name="v_plain">
Expand Down

0 comments on commit 8f7d999

Please sign in to comment.