Commit fbbb7416 authored by bettin5's avatar bettin5
Browse files

parse literatur list

parent 2d16776e
......@@ -71,11 +71,68 @@ Refer to comments in the code to understand the used algorithm.
</field>
</xsl:for-each>
<xsl:apply-templates select="facsimile" />
<xsl:apply-templates select="//listBibl" />
</doc>
<xsl:apply-templates select="text" mode="page_splitting" />
</add>
</add>
</xsl:template>
<xsl:template match="listBibl">
<doc>
<xsl:for-each select="bibl">
<field name="literatur">
<field name="literatur_id">
<xsl:value-of select="./@xml:id"/>
</field>
<xsl:for-each select="relatedItem">
<field name="uri">
<xsl:value-of select="ref/@target"/>
</field>
</xsl:for-each>
<xsl:for-each select="author">
<field name="author">
<xsl:value-of select="."/>
</field>
</xsl:for-each>
<xsl:for-each select="editor">
<field name="editor">
<xsl:value-of select="./normalize-space()"/>
</field>
</xsl:for-each>
<xsl:for-each select="title">
<field name="title">
<xsl:value-of select="./normalize-space()"/>
</field>
</xsl:for-each>
<field name="edition">
<xsl:value-of select="edition"/>
</field>
<field name="pub_place">
<xsl:value-of select="pubPlace/name"/>
</field>
<field name="publisher">
<xsl:value-of select="publisher/normalize-space()"/>
</field>
<xsl:if test="date/@type='pub'">
<field name="pub_date">
<xsl:value-of select="date"/>
</field>
</xsl:if>
<field name="idno">
<xsl:value-of select="idno"/>
</field>
<xsl:for-each select="relatedItem">
<field name="refs">
<xsl:value-of select="./normalize-space()"/>
</field>
</xsl:for-each>
</field>
</xsl:for-each>
</doc>
</xsl:template>
<xsl:template match="text()" mode="text_only">
<xsl:variable name="currentText" select="replace(., '\s+', ' ')" />
......@@ -182,9 +239,7 @@ Refer to comments in the code to understand the used algorithm.
</field>
</xsl:template>
<!--################### text/body ##########################-->
<!--################### text/body ##########################-->
<xsl:template match="facsimile">
<field name="image_ids">
......@@ -329,7 +384,7 @@ Refer to comments in the code to understand the used algorithm.
</field>
</xsl:for-each>
<xsl:if test="./@facs">
<field name="image_id"> <!-- TODO with out if generate empty field ?!? -->
<field name="image_id">
<xsl:value-of select="./@facs"/>
</field>
</xsl:if>
......
......@@ -45,10 +45,26 @@
</fieldType>
<field name="id" type="string" required="true" />
<!-- for doctype 'literatur' -->
<!-- TODO where?
<field name="literatur_id" type="string" />
<field name="uri" type="string" />
<field name="authors" type="string" multiValued="true" />
<field name="editors" type="string" multiValued="true" />
<field name="title" type="string" />
<field name="edition" type="string" />
<field name="pub_place" type="string" />
<field name="publisher" type="string" />
<field name="pub_date" type="date" />
<field name="idno" type="string"></field>
<field name="credentials" type="string" multiValued="true" />
-->
<!-- 'article' or 'page' -->
<field name="doctype" type="string" required="true" />
<!-- for doctype 'page' -->
<field name="article_id" type="string" />
<field name="page_number" 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