Commit f6372ea3 authored by jerome's avatar jerome
Browse files

add field for lit/ chg title scraping

parent bf8f6032
......@@ -233,48 +233,24 @@ Refer to comments in the code to understand the used algorithm.
</field>
</xsl:for-each>
<!-- TITLE SHIT -->
<xsl:choose>
<xsl:when test="title/@level = 'm'">
<field name="title" level= 'm' type = 'main'>
<xsl:value-of select="title[@type='main']/normalize-space()"/>
</field>
<field name="title" level= 'm' type = 'sub'>
<xsl:value-of select="title[@type='sub']/normalize-space()"/>
<xsl:for-each select="title/@level">
<field name ='title_level'>
<xsl:value-of select="./normalize-space()"/>
</field>
</xsl:when>
<xsl:when test="title/@level = 's'">
<field name="title" level= 's' type = 'main'>
</xsl:for-each>
<field name="title">
<xsl:value-of select="title[@type='main']/normalize-space()"/>
</field>
<field name="title" level= 's' type = 'sub'>
<xsl:value-of select="title[@type='sub']/normalize-space()"/>
</field>
</xsl:when>
<xsl:when test="title/@level = 'j'">
<field name="title" level = "j">
<xsl:value-of select="title[@type='main']/normalize-space()"/>
</field>
<field name="title" level= 'j' type = 'sub'>
<xsl:value-of select="title[@type='sub']/normalize-space()"/>
</field>
</xsl:when>
<xsl:when test="title/@level = 'a'">
<field name="title" level = 'a'>
<xsl:value-of select="title[@type='main']/normalize-space()"/>
</field>
</xsl:when>
<xsl:when test="title/@level = '' and @type='sub'">
<field name="title" level = 'a' type='sub' >
<xsl:value-of select="title[@type='sub']/normalize-space()"/>
</field>
</xsl:when>
<xsl:when test="title/@level = 'm' ">
<field name="title" level = 'm' >
<xsl:value-of select="title[@type='main']/normalize-space()"/>
</field>
</xsl:when>
</xsl:choose>
<xsl:if test="title/@type = 'sub'">
<field name="sub_title">
<xsl:value-of select="title[@type='sub']/normalize-space()"/>
</field>
</xsl:if>
<xsl:for-each select="biblScope">
<field name="biblScope">
<xsl:value-of select="./normalize-space()"/>
</field>
</xsl:for-each>
<xsl:if test="edition!=''">
<field name="edition">
<xsl:value-of select="edition/normalize-space()"/>
......@@ -460,7 +436,6 @@ Refer to comments in the code to understand the used algorithm.
<xsl:choose>
<xsl:when test="contains(document-uri(/), 'Lit')">
<field name="doctype">literature_meta</field>
</xsl:when>
<xsl:otherwise>
......
......@@ -65,6 +65,8 @@
<!-- for doctype 'literature' -->
<field name="main_title" type="string"/>
<field name="sub_title" type="string"/>
<field name="uri" type="string" multiValued="true"/>
<field name="literature_author" type="string" multiValued="true"/>
<field name="editor" type="string" multiValued="true" />
......@@ -73,7 +75,9 @@
<field name="publisher" type="string" multiValued="true"/>
<field name="pub_date" type="string" multiValued="true"/>
<field name="idno" type="string" />
<field name="title_level" type="string" multiValued="true"/>
<field name="extent" type="string" multiValued="true"/>
<field name="biblScope" type="string" multiValued="true"/>
<!-- for doctype 'page' -->
<field name="article_id" type="string" />
......
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