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:for-each> <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> </doc>
</xsl:if> </xsl:if>
</xsl:for-each-group> </xsl:for-each-group>
...@@ -1069,5 +1082,16 @@ Refer to comments in the code to understand the used algorithm. ...@@ -1069,5 +1082,16 @@ Refer to comments in the code to understand the used algorithm.
</div> </div>
</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>
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<field name="image_ids" type="string" multiValued="true"/> <field name="image_ids" type="string" multiValued="true"/>
<field name="image_urls" type="string" multiValued="true"/> <field name="image_urls" type="string" multiValued="true"/>
<field name="image_url" type="string" multiValued="false" /> <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' --> <!-- for doctype 'article' -->
<field name="number_of_pages" type="int" /> <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