-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconvert_mods-to-tei_file.xsl
54 lines (54 loc) · 3.32 KB
/
convert_mods-to-tei_file.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet exclude-result-prefixes="#all" version="3.0" xmlns="http://www.tei-c.org/ns/1.0" xmlns:mods="http://www.loc.gov/mods/v3" xmlns:oape="https://openarabicpe.github.io/ns"
xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:zot="https://zotero.org"
xpath-default-namespace="http://www.tei-c.org/ns/1.0">
<xsl:output encoding="UTF-8" indent="yes" method="xml" omit-xml-declaration="no" version="1.0"/>
<!-- this stylesheet translates <mods:mods> to <tei:biblStruct> -->
<xsl:include href="convert_mods-to-tei_functions.xsl"/>
<!-- debugging -->
<xsl:template match="/">
<xsl:result-document href="{$v_base-directory}{$p_output-folder}{$v_file-name_input}.TEIP5.xml">
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:tei="http://www.tei-c.org/ns/1.0">
<teiHeader xml:lang="en">
<fileDesc>
<titleStmt>
<title>Bibliographic data converted from MODS XML to TEI</title>
<xsl:copy-of select="$p_editor"/>
</titleStmt>
<publicationStmt>
<p>This file is, yet, unpublished</p>
</publicationStmt>
<sourceDesc>
<p>This file is a born-digital file and was generated by automatic conversion from the MODS file <ref target="{base-uri()}"><xsl:value-of select="$v_file-name_input"
/></ref>.</p>
</sourceDesc>
</fileDesc>
<revisionDesc>
<change when="{$p_today-iso}" who="{$p_id-editor}">Created this file through automated conversion from MODS</change>
</revisionDesc>
</teiHeader>
<standOff>
<listBibl>
<xsl:apply-templates mode="m_mods-to-tei" select="descendant::mods:mods[not(ancestor::mods:extension)]"/>
</listBibl>
<!-- list of holding organisations -->
<listOrg>
<xsl:variable name="v_holding-institutions">
<xsl:apply-templates select="descendant::mods:mods[ancestor::mods:extension]" mode="m_get-holding-institutions"/>
</xsl:variable>
<xsl:for-each-group select="$v_holding-institutions/tei:org" group-by="tei:orgName[1]">
<xsl:sort select="current-grouping-key()"/>
<xsl:apply-templates select="."/>
</xsl:for-each-group>
<!--<xsl:for-each-group select="$v_holding-institutions/descendant-or-self::tei:idno[@type = 'isil']" group-by=".">
<xsl:apply-templates select="." mode="m_isil-to-tei"/>
</xsl:for-each-group>-->
</listOrg>
</standOff>
</TEI>
</xsl:result-document>
</xsl:template>
<xsl:template match="mods:mods" mode="m_mods-to-tei">
<xsl:copy-of select="oape:bibliography-mods-to-tei(.)"/>
</xsl:template>
</xsl:stylesheet>