Commit 135ba92c authored by Dennis Neumann's avatar Dennis Neumann
Browse files

Add licence from TEIs

parent 7a1dce0b
......@@ -107,6 +107,7 @@ Refer to comments in the code to understand the used algorithm.
<xsl:apply-templates select="titleStmt/title[@type='desc']/date[@type='orn']" />
<xsl:apply-templates select="titleStmt/author/name" />
<xsl:apply-templates select="sourceDesc" />
<xsl:apply-templates select="publicationStmt/availability/licence" />
<xsl:template match="profileDesc/textClass">
......@@ -161,6 +162,12 @@ Refer to comments in the code to understand the used algorithm.
<xsl:template match="licence">
<field name="licence">
<xsl:value-of select="text()" />
<xsl:template match="textClass/keywords[@scheme='#gnd']/term">
<field name="gnd_keyword">
<xsl:apply-templates mode="text_only" />
......@@ -35,6 +35,13 @@ public class XsltTest {
public void licence() throws Exception {
String result = transform("licence.xml");
assertXpathEvaluatesTo("CC BY-NC-SA-4.0", "//field[@name='licence']", result);
public void twoDifferentLanguages() throws Exception {
String result = transform("language_twoDifferentEntries.xml");
<?xml version="1.0" encoding="UTF-8"?>
<TEI xmlns="">
>CC BY-NC-SA-4.0</licence>
<text xml:id="my_id" xml:lang="ger">
<p>Test text.</p>
\ No newline at end of file
......@@ -57,6 +57,7 @@
<!-- for doctype 'article' -->
<field name="number_of_pages" type="int" />
<field name="language" type="string" multiValued="true" />
<field name="licence" type="string" />
<field name="fulltext" type="text_de" multiValued="false" />
<field name="fulltext_html" type="text_de" multiValued="false" />
<field name="short_title" type="text_de" multiValued="false" />
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