Commit 7af1d867 authored by bettin5@sub.uni-goettingen.de's avatar bettin5@sub.uni-goettingen.de
Browse files

entitys per page

parent db42d0ba
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
...@@ -753,13 +753,26 @@ Refer to comments in the code to understand the used algorithm. ...@@ -753,13 +753,26 @@ Refer to comments in the code to understand the used algorithm.
</field> </field>
</xsl:if> </xsl:if>
<xsl:for-each select="$context//name/@ref">
<xsl:if test=". != 'gnd:_' and starts-with(., 'gnd:') "> <xsl:variable name="current-pb" select="."/>
<field name="entitys_in_page"> <xsl:variable name="next-pb" select="following::pb[1]"/>
<xsl:value-of select="."/> <xsl:choose>
</field> <xsl:when test="$next-pb">
</xsl:if> <xsl:for-each select="$current-pb/following::name intersect $next-pb/preceding::name">
<xsl:call-template name="make-entities-on-page-if-possible">
<xsl:with-param name="name" select="."/>
</xsl:call-template>
</xsl:for-each>
</xsl:when>
<!-- in this case we are on the last page of the letter -->
<xsl:otherwise>
<xsl:for-each select="$current-pb/following::name">
<xsl:call-template name="make-entities-on-page-if-possible">
<xsl:with-param name="name" select="."/>
</xsl:call-template>
</xsl:for-each> </xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</doc> </doc>
</xsl:if> </xsl:if>
</xsl:for-each-group> </xsl:for-each-group>
...@@ -1070,4 +1083,15 @@ Refer to comments in the code to understand the used algorithm. ...@@ -1070,4 +1083,15 @@ Refer to comments in the code to understand the used algorithm.
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template name="make-entities-on-page-if-possible">
<xsl:param name="name"/>
<xsl:variable name="ref" select="$name/@ref"/>
<xsl:if test="$ref != 'gnd:_' and starts-with($ref, 'gnd:') ">
<field name="entitys_in_page">
<xsl:value-of select="$ref"/>
</field>
</xsl:if>
</xsl:template>
</xsl:stylesheet> </xsl:stylesheet>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment