Due to maintenance reasons, gitlab.gwdg.de will not be available on Saturday 2021-07-24 from 10:30 to approximately 11:30 CEST.

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.
</field>
</xsl:if>
<xsl:for-each select="$context//name/@ref">
<xsl:if test=". != 'gnd:_' and starts-with(., 'gnd:') ">
<field name="entitys_in_page">
<xsl:value-of select="."/>
</field>
</xsl:if>
</xsl:for-each>
<xsl:variable name="current-pb" select="."/>
<xsl:variable name="next-pb" select="following::pb[1]"/>
<xsl:choose>
<xsl:when test="$next-pb">
<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:otherwise>
</xsl:choose>
</doc>
</xsl:if>
</xsl:for-each-group>
......@@ -1069,5 +1082,16 @@ Refer to comments in the code to understand the used algorithm.
</div>
</xsl:if>
</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>
......@@ -98,7 +98,7 @@
<field name="image_ids" type="string" multiValued="true"/>
<field name="image_urls" type="string" multiValued="true"/>
<field name="image_url" type="string" multiValued="false" />
<field name="entitys_in_page" type="string" multiValued="true"/>
<field name="entitys_in_page" type="string" multiValued="true"/>
<!-- for doctype 'article' -->
<field name="number_of_pages" type="int" />
......
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