Skip to content

Commit

Permalink
if loop for endDates
Browse files Browse the repository at this point in the history
  • Loading branch information
emgeier authored Nov 18, 2024
1 parent 2f9ab2e commit 10f3065
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion json-stylesheet.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -953,13 +953,15 @@
<number xmlns="http://www.w3.org/2005/xpath-functions"><xsl:value-of select="$startDate"/></number>
</xsl:for-each>
</array>
<xsl:if test="$doc/descendant::tei:state[@type = 'confession'][@srophe:computed-end]">
<array key="religiousCommunitiesDatesEnd" xmlns="http://www.w3.org/2005/xpath-functions">
<xsl:for-each select="$doc/descendant::tei:state[@type = 'confession']">
<xsl:variable name="endDate" select="local:format-date(@srophe:computed-end)"/>
<number xmlns="http://www.w3.org/2005/xpath-functions"><xsl:value-of select="$endDate"/></number>
</xsl:for-each>
</array>
</xsl:if>
</xsl:if>
</xsl:if>
</xsl:if>
</xsl:template>
<xsl:template match="*:fields[@function = 'existenceDates']">
Expand All @@ -973,12 +975,14 @@
<number xmlns="http://www.w3.org/2005/xpath-functions"><xsl:value-of select="$startDate"/></number>
</xsl:for-each>
</array>
<xsl:if test="$doc/descendant::tei:state[@type = 'existence'][@srophe:computed-end]">
<array key="existenceDatesEnd" xmlns="http://www.w3.org/2005/xpath-functions">
<xsl:for-each select="$doc/descendant::tei:state[@type = 'existence']">
<xsl:variable name="endDate" select="local:format-date(@srophe:computed-end)"/>
<number xmlns="http://www.w3.org/2005/xpath-functions"><xsl:value-of select="$endDate"/></number>
</xsl:for-each>
</array>
</xsl:if>
</xsl:if>
</xsl:if>
</xsl:template>
Expand Down

0 comments on commit 10f3065

Please sign in to comment.