Skip to content

Commit

Permalink
X3ML for MMM: Mappings changes to fix error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-morrison committed Jan 30, 2019
1 parent 808d4ca commit d0e62a1
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 40 deletions.
2 changes: 1 addition & 1 deletion processing/analysis/mmm/manuscripts_mapping.x3ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<source_info>
<source_schema type="" version=""/>
<namespaces>
<namespace prefix="" uri=""/>
<namespace prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
</namespaces>
</source_info>
<source_collection/>
Expand Down
20 changes: 8 additions & 12 deletions processing/analysis/mmm/persons_mapping.x3ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<source_info>
<source_schema type="" version=""/>
<namespaces>
<namespace prefix="" uri=""/>
<namespace prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
</namespaces>
</source_info>
<source_collection/>
Expand Down Expand Up @@ -68,8 +68,7 @@
<arg name="identifier" type="xpath">@xml:id</arg>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">persName[@type="display"]/descendant-or-self::text()[normalize-space()]</arg>
<arg name="language" type="constant">und</arg>
<arg name="text" type="xpath">persName[@type="display"]/normalize-space(string())</arg>
</label_generator>
</entity>
</target_node>
Expand All @@ -96,8 +95,7 @@
<arg name="component" type="constant">appellation</arg>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">descendant-or-self::text()[normalize-space()]</arg>
<arg name="language" type="constant">und</arg>
<arg name="text" type="xpath">normalize-space(string())</arg>
</label_generator>
</entity>
</target_node>
Expand Down Expand Up @@ -135,8 +133,7 @@
<arg name="counter" type="xpathPosition"/>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">descendant-or-self::text()[normalize-space()]</arg>
<arg name="language" type="constant">und</arg>
<arg name="text" type="xpath">normalize-space(string())</arg>
</label_generator>
</entity>
</target_node>
Expand Down Expand Up @@ -169,7 +166,6 @@
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">text()</arg>
<arg name="language" type="constant">und</arg>
</label_generator>
</entity>
</target_node>
Expand Down Expand Up @@ -210,7 +206,7 @@
<arg name="component" type="constant">birth</arg>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">concat('Birth of ', string-join(../../persName[@type="display"]/descendant-or-self::text()[normalize-space()], ""))</arg>
<arg name="text" type="xpath">concat('Birth of ', string-join(../../persName[@type="display"]/normalize-space(string()), ""))</arg>
<arg name="language" type="constant">en</arg>
</label_generator>
</entity>
Expand All @@ -222,7 +218,7 @@
<arg name="component" type="constant">birth-time-span</arg>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">concat('Time-span of birth of ', string-join(../../persName[@type="display"]/descendant-or-self::text()[normalize-space()], ""))</arg>
<arg name="text" type="xpath">concat('Time-span of birth of ', string-join(../../persName[@type="display"]/normalize-space(string()), ""))</arg>
<arg name="language" type="constant">en</arg>
</label_generator>
</entity>
Expand Down Expand Up @@ -288,7 +284,7 @@
<arg name="component" type="constant">death</arg>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">concat('Death of ', string-join(../../persName[@type="display"]/descendant-or-self::text()[normalize-space()], ""))</arg>
<arg name="text" type="xpath">concat('Death of ', string-join(../../persName[@type="display"]/normalize-space(string()), ""))</arg>
<arg name="language" type="constant">en</arg>
</label_generator>
</entity>
Expand All @@ -300,7 +296,7 @@
<arg name="component" type="constant">death-time-span</arg>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">concat('Time-span of death of ', string-join(../../persName[@type="display"]/descendant-or-self::text()[normalize-space()], ""))</arg>
<arg name="text" type="xpath">concat('Time-span of death of ', string-join(../../persName[@type="display"]/normalize-space(string()), ""))</arg>
<arg name="language" type="constant">en</arg>
</label_generator>
</entity>
Expand Down
25 changes: 9 additions & 16 deletions processing/analysis/mmm/places_mapping.x3ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<source_info>
<source_schema type="" version=""/>
<namespaces>
<namespace prefix="" uri=""/>
<namespace prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
</namespaces>
</source_info>
<source_collection/>
Expand Down Expand Up @@ -68,8 +68,7 @@
<arg name="identifier" type="xpath">@xml:id</arg>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">placeName[@type="index"]/descendant-or-self::text()[normalize-space()]</arg>
<arg name="language" type="constant">und</arg>
<arg name="text" type="xpath">placeName[@type="index"]/normalize-space(string())</arg>
</label_generator>
</entity>
</target_node>
Expand All @@ -96,8 +95,7 @@
<arg name="component" type="constant">appellation</arg>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">descendant-or-self::text()[normalize-space()]</arg>
<arg name="language" type="constant">und</arg>
<arg name="text" type="xpath">normalize-space(string())</arg>
</label_generator>
</entity>
</target_node>
Expand Down Expand Up @@ -135,8 +133,7 @@
<arg name="counter" type="xpathPosition"/>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">descendant-or-self::text()[normalize-space()]</arg>
<arg name="language" type="constant">und</arg>
<arg name="text" type="xpath">normalize-space(string())</arg>
</label_generator>
</entity>
</target_node>
Expand Down Expand Up @@ -177,7 +174,7 @@
<arg name="component" type="constant">place-centroid</arg>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">concat('Centroid of ', ../../placeName[@type="index"]/descendant-or-self::text()[normalize-space()])</arg>
<arg name="text" type="xpath">concat('Centroid of ', ../../placeName[@type="index"]/normalize-space(string()))</arg>
<arg name="language" type="constant">en</arg>
</label_generator>
</entity>
Expand Down Expand Up @@ -217,7 +214,6 @@
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">text()</arg>
<arg name="language" type="constant">und</arg>
</label_generator>
</entity>
</target_node>
Expand Down Expand Up @@ -271,8 +267,7 @@
<arg name="identifier" type="xpath">@xml:id</arg>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">orgName[@type="display"]/descendant-or-self::text()[normalize-space()]</arg>
<arg name="language" type="constant">und</arg>
<arg name="text" type="xpath">orgName[@type="display"]/normalize-space(string())</arg>
</label_generator>
</entity>
</target_node>
Expand All @@ -299,8 +294,7 @@
<arg name="component" type="constant">appellation</arg>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">descendant-or-self::text()[normalize-space()]</arg>
<arg name="language" type="constant">und</arg>
<arg name="text" type="xpath">normalize-space(string())</arg>
</label_generator>
</entity>
</target_node>
Expand Down Expand Up @@ -338,8 +332,7 @@
<arg name="counter" type="xpathPosition"/>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">descendant-or-self::text()[normalize-space()]</arg>
<arg name="language" type="constant">und</arg>
<arg name="text" type="xpath">normalize-space(string())</arg>
</label_generator>
</entity>
</target_node>
Expand Down Expand Up @@ -406,4 +399,4 @@
</mapping>
</mappings>

</x3ml>
</x3ml>
17 changes: 6 additions & 11 deletions processing/analysis/mmm/works_mapping.x3ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<source_info>
<source_schema type="" version=""/>
<namespaces>
<namespace prefix="" uri=""/>
<namespace prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
</namespaces>
</source_info>
<source_collection/>
Expand Down Expand Up @@ -68,8 +68,7 @@
<arg name="identifier" type="xpath">@xml:id</arg>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">title[@type="uniform"]/descendant-or-self::text()[normalize-space()]</arg>
<arg name="language" type="constant">und</arg>
<arg name="text" type="xpath">title[@type="uniform"]/normalize-space(string())</arg>
</label_generator>
</entity>
</target_node>
Expand All @@ -96,8 +95,7 @@
<arg name="component" type="constant">appellation</arg>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">descendant-or-self::text()[normalize-space()]</arg>
<arg name="language" type="constant">und</arg>
<arg name="text" type="xpath">normalize-space(string())</arg>
</label_generator>
</entity>
</target_node>
Expand Down Expand Up @@ -135,8 +133,7 @@
<arg name="counter" type="xpathPosition"/>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">descendant-or-self::text()[normalize-space()]</arg>
<arg name="language" type="constant">und</arg>
<arg name="text" type="xpath">normalize-space(string())</arg>
</label_generator>
</entity>
</target_node>
Expand Down Expand Up @@ -183,7 +180,6 @@
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">@mainLang</arg>
<arg name="language" type="constant">und</arg>
</label_generator>
</entity>
</target_node>
Expand All @@ -203,7 +199,7 @@
<arg name="component" type="constant">work-conception</arg>
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">concat('Work conception of ', string-join(../title[@type="uniform"]/descendant-or-self::text()[normalize-space()],''))</arg>
<arg name="text" type="xpath">concat('Work conception of ', string-join(../title[@type="uniform"]/normalize-space(string()),''))</arg>
<arg name="language" type="constant">en</arg>
</label_generator>
</entity>
Expand All @@ -220,7 +216,6 @@
</instance_generator>
<label_generator name="Literal">
<arg name="text" type="xpath">text()</arg>
<arg name="language" type="constant">und</arg>
</label_generator>
</entity>
</target_node>
Expand All @@ -229,4 +224,4 @@
</mapping>
</mappings>

</x3ml>
</x3ml>

0 comments on commit d0e62a1

Please sign in to comment.