Skip to content

Commit

Permalink
add proper ID detection for TEI files coming from the WorldViews coll…
Browse files Browse the repository at this point in the history
…ection #22
  • Loading branch information
proycon committed Nov 27, 2020
1 parent 0610c2e commit 256cee4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion foliatools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""FoLiA-tools contains various Python-based command line tools for working with FoLiA XML (Format for Linguistic Annotation)"""

VERSION = "2.4.1"
VERSION = "2.4.2"
2 changes: 1 addition & 1 deletion foliatools/tei2folia.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Heavily adapted by Maarten van Gompel (Radboud University)

<xsl:strip-space elements="tei:l tei:p tei:interp tei:meta tei:interpGrp"/>

<xsl:param name="docid"><xsl:choose><xsl:when test="normalize-space(//tei:publicationStmt/tei:idno/tei:idno[@type='DOI']/text())">DOI.<xsl:value-of select="normalize-space(//tei:publicationStmt/tei:idno/tei:idno[@type='DOI']/text())" /></xsl:when><xsl:when test="normalize-space(//tei:publicationStmt/tei:idno/tei:idno[@type='ISSN']/text())">ISSN.<xsl:value-of select="normalize-space(//tei:publicationStmt/tei:idno/tei:idno[@type='ISSN']/text())" /></xsl:when><xsl:when test="normalize-space(//tei:publicationStmt/tei:idno/tei:idno[@type='ISBN']/text())">ISBN.<xsl:value-of select="normalize-space(//tei:publicationStmt/tei:idno/tei:idno[@type='ISBN']/text())" /></xsl:when><xsl:when test="normalize-space(//tei:publicationStmt/tei:idno/tei:idno[@type='DTADirName']/text())"><xsl:value-of select="normalize-space(//tei:publicationStmt/tei:idno/tei:idno[@type='DTADirName']/text())" /></xsl:when><xsl:when test="normalize-space(//tei:publicationStmt/tei:idno/text())"><xsl:value-of select="normalize-space(//tei:publicationStmt/tei:idno/text())"/></xsl:when><xsl:otherwise>untitled</xsl:otherwise></xsl:choose></xsl:param>
<xsl:param name="docid"><xsl:choose><xsl:when test="normalize-space(//tei:publicationStmt/tei:idno/tei:idno[@type='DOI']/text())">DOI.<xsl:value-of select="normalize-space(//tei:publicationStmt/tei:idno/tei:idno[@type='DOI']/text())" /></xsl:when><xsl:when test="normalize-space(//tei:publicationStmt/tei:idno/tei:idno[@type='ISSN']/text())">ISSN.<xsl:value-of select="normalize-space(//tei:publicationStmt/tei:idno/tei:idno[@type='ISSN']/text())" /></xsl:when><xsl:when test="normalize-space(//tei:publicationStmt/tei:idno/tei:idno[@type='ISBN']/text())">ISBN.<xsl:value-of select="normalize-space(//tei:publicationStmt/tei:idno/tei:idno[@type='ISBN']/text())" /></xsl:when><xsl:when test="normalize-space(//tei:publicationStmt/tei:idno/tei:idno[@type='DTADirName']/text())"><xsl:value-of select="normalize-space(//tei:publicationStmt/tei:idno/tei:idno[@type='DTADirName']/text())" /></xsl:when><xsl:when test="normalize-space(//tei:publicationStmt/tei:idno[@type='WV_ID']/text())"><xsl:value-of select="normalize-space(//tei:publicationStmt/tei:idno[@type='WV_ID']/text())" /></xsl:when><xsl:when test="normalize-space(//tei:publicationStmt/tei:idno/text())"><xsl:value-of select="normalize-space(//tei:publicationStmt/tei:idno/text())"/></xsl:when><xsl:otherwise>undefined</xsl:otherwise></xsl:choose></xsl:param>
<xsl:param name='generateIds'>false</xsl:param> <!-- better leave this up to postprocessing tools (e.g. foliaid) -->
<xsl:param name="quiet">false</xsl:param>

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def read(fname):

setup(
name = "FoLiA-tools",
version = "2.4.1", #also change in __init__.py
version = "2.4.2", #also change in __init__.py
author = "Maarten van Gompel",
author_email = "proycon@anaproy.nl",
description = ("FoLiA-tools contains various Python-based command line tools for working with FoLiA XML (Format for Linguistic Annotation)"),
Expand Down

0 comments on commit 256cee4

Please sign in to comment.