Skip to content

Commit

Permalink
birthdate update for computed date
Browse files Browse the repository at this point in the history
  • Loading branch information
emgeier authored Nov 12, 2024
1 parent 5523e1a commit 2747a37
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions json-stylesheet.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -930,18 +930,24 @@
<xsl:if test="$doc/descendant::tei:birth/tei:date">
<array key="birthDate" xmlns="http://www.w3.org/2005/xpath-functions">
<xsl:for-each select="$doc/descendant::tei:birth/tei:date">
<xsl:variable name="date">
<xsl:choose>
<xsl:when test="@srophe:computed-start">
<xsl:value-of select="local:format-date(@srophe:computed-start)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="local:format-date(normalize-space(.))"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<string xmlns="http://www.w3.org/2005/xpath-functions">
<xsl:value-of select="local:format-date(.)"/>
<xsl:value-of select="$date"/>
</string>
</xsl:for-each>
</array>
</xsl:if>
</xsl:template>





<!-- <xsl:template match="*:fields[@function = 'deathDate']">
<xsl:param name="doc"/>
<xsl:if test="$doc/descendant::tei:death/tei:date">
Expand Down

0 comments on commit 2747a37

Please sign in to comment.