Skip to content

Commit

Permalink
Merge pull request #86 from acdh-oeaw/85-elan2tei-conversion-not-working
Browse files Browse the repository at this point in the history
change ID source from title to idno
  • Loading branch information
dasch124 authored Oct 30, 2024
2 parents 96d6c2b + 4bbc3d3 commit 5c76a2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="../@*"/>
<xsl:attribute name="xtoks:id" select="concat(root()//tei:title[@level ='a'],'_',@xtoks:id)"/>
<xsl:attribute name="xtoks:id" select="concat(root()//tei:idno[@type ='SHAWICorpusID'],'_',@xtoks:id)"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
Expand Down Expand Up @@ -152,7 +152,7 @@
<xsl:copy copy-namespaces="no">
<xsl:copy-of select="@* except @xml:id"/>
<xsl:attribute name="xtoks:id"
select="concat(root()//tei:title[@level ='a'],'_',@xtoks:id)"/>
select="concat(root()//tei:idno[@type ='SHAWICorpusID'],'_',@xtoks:id)"/>
<xsl:attribute name="join">right</xsl:attribute>
<xsl:if test="following-sibling::*[1]/self::xtoks:pc[. = '-']">
<xsl:attribute name="rend">withDash</xsl:attribute>
Expand All @@ -168,7 +168,7 @@
<xsl:attribute name="join" select="$join"/>
</xsl:if>
<xsl:attribute name="xtoks:id"
select="concat(root()//tei:title[@level ='a'],'_',@xtoks:id)"/>
select="concat(root()//tei:idno[@type ='SHAWICorpusID'],'_',@xtoks:id)"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
Expand Down
2 changes: 1 addition & 1 deletion 082_scripts_xsl/mergeHeaderAndTranscription.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<xsl:param name="pathToCorpusDoc"/>
<xsl:variable name="input" select="."/>
<xsl:variable name="corpusDoc" select="doc($pathToCorpusDoc)" as="document-node()"/>
<xsl:variable name="IDcandidates" select="$corpusDoc//*:title"/>
<xsl:variable name="IDcandidates" select="$corpusDoc//*:idno[@type='SHAWICorpusID']"/>
<xsl:variable name="pathSegs" select="tokenize(base-uri($input),'[/_]')"/>
<xsl:variable name="recordingID" select="$IDcandidates[some $x in $pathSegs satisfies lower-case($x) = lower-case(.)]"/>
<xsl:variable name="teiHeaderFromCorpus" select="$recordingID/ancestor::tei:teiHeader" as="element(tei:teiHeader)?"/>
Expand Down

0 comments on commit 5c76a2d

Please sign in to comment.