Skip to content

Commit

Permalink
add Geonames feature class 'R'
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Stadler <[email protected]>
  • Loading branch information
peterstadler committed Jan 12, 2023
1 parent 78c7611 commit cbf32f0
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 15 deletions.
4 changes: 4 additions & 0 deletions compiled-ODD/guidelines-de-wegaPlaces.compiled.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7137,6 +7137,10 @@ psychological significance.
<gloss versionDate="2022-10-24" xml:lang="en">parks, area, …</gloss>
<gloss versionDate="2022-10-24" xml:lang="de">Park, Anlage, …</gloss>
</valItem>
<valItem ident="R">
<gloss versionDate="2023-01-12" xml:lang="en">road, railroad</gloss>
<gloss versionDate="2023-01-12" xml:lang="de">Strasse, Eisenbahn</gloss>
</valItem>
<valItem ident="S">
<gloss versionDate="2022-10-24" xml:lang="en">spot, building, farm</gloss>
<gloss versionDate="2022-10-24" xml:lang="de">Gebäude, Farm, …</gloss>
Expand Down
46 changes: 33 additions & 13 deletions schema/de/wegaPlaces.isosch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<title>ISO Schematron rules</title>
<!-- This file generated 2022-11-21T13:49:03Z by 'extract-isosch.xsl'. -->
<!-- This file generated 2023-01-12T15:50:18Z by 'extract-isosch.xsl'. -->

<!-- ********************* -->
<!-- namespaces, declared: -->
Expand Down Expand Up @@ -303,67 +303,87 @@
<report test="@type=('geonames')">Geonames IDs are not meant for persons.</report>
</rule>
</pattern>
<pattern id="schematron-constraint-wegaPlaces-geo-whitespace-separated-coordinates-37">
<pattern id="schematron-constraint-wegaPlaces-orgName-parent-org-37">
<rule context="tei:orgName[parent::tei:org]">
<report test="@key or not(@type)">It is required to give the type ('alt' or 'reg') of the name while @key is forbiden here.</report>
</rule>
</pattern>
<pattern id="schematron-constraint-wegaPlaces-orgName-parent-org-reg-38">
<rule context="tei:orgName[parent::tei:org and not(preceding::tei:orgName)]">
<assert test="@type='reg'">There must exactly be one name with @type='reg'.</assert>
</rule>
</pattern>
<pattern id="schematron-constraint-wegaPlaces-orgName-parent-org-reg2-39">
<rule context="tei:orgName[parent::tei:org and preceding::tei:orgName]">
<report test="@type='reg'">Only the first name can be of @type='reg'. Following names are supposed to be alternative names, @type='alt'.</report>
</rule>
</pattern>
<pattern id="schematron-constraint-wegaPlaces-orgName-parent-not-org-40">
<rule context="tei:orgName[not(parent::tei:org)]">
<report test="@type">No @type attribute allowed here.</report>
</rule>
</pattern>
<pattern id="schematron-constraint-wegaPlaces-geo-whitespace-separated-coordinates-41">
<rule context="tei:geo">
<assert test="matches(., '^\-?\d+(\.\d+)? \-?\d+(\.\d+)?$')">There must be two coordinates, separated with a whitespace only (no comma!)</assert>
</rule>
</pattern>
<pattern id="schematron-constraint-wegaPlaces-place-count-modern-names-38">
<pattern id="schematron-constraint-wegaPlaces-place-count-modern-names-42">
<rule context="tei:placeName[@type='modern']">
<let name="lang" value="string(@xml:lang)"/>
<report test="following-sibling::tei:placeName[@type='modern'][string(@xml:lang)=$lang]">Only one modern name per xml:lang allowed.</report>
</rule>
</pattern>
<pattern id="schematron-constraint-wegaPlaces-state-org-states-39">
<pattern id="schematron-constraint-wegaPlaces-state-org-states-43">
<rule context="tei:state">
<assert test="tei:label=('Ort', 'Kategorie')">label for state should be 'Ort' or 'Kategorie'.</assert>
</rule>
</pattern>
<pattern id="schematron-constraint-wegaPlaces-styleguide-document-node-content-40">
<pattern id="schematron-constraint-wegaPlaces-styleguide-document-node-content-44">
<rule context="document-node()">
<report test="count(processing-instruction()) ne 2">WeGA styleguide error: there should exactly be two processing instructions before the root element</report>
<report test="comment()">WeGA styleguide error: there should be no comments outside the root element</report>
</rule>
</pattern>
<pattern id="schematron-constraint-wegaPlaces-whitespaceOnlyContent-41">
<pattern id="schematron-constraint-wegaPlaces-whitespaceOnlyContent-45">
<rule context="tei:surname | tei:forename | tei:persName | tei:author[not(@sameAs)] | tei:occupation | tei:settlement | tei:country | tei:region | tei:rs | tei:workName | tei:characterName | tei:hi[not(.//tei:gap)] | tei:head | tei:note[not(@type=('thematicCom'))] | tei:placeName | tei:title | tei:seg | tei:item[not(@* or *)]">
<report test="normalize-space(.) = ''">
<name/> has whitespace only content</report>
</rule>
</pattern>
<pattern id="schematron-constraint-wegaPlaces-elementStartsWithWhitespace-42">
<pattern id="schematron-constraint-wegaPlaces-elementStartsWithWhitespace-46">
<rule context="tei:surname | tei:forename | tei:persName[not(@type)] | tei:author | tei:occupation | tei:settlement | tei:country | tei:region | tei:rs | tei:workName | tei:characterName | tei:hi | tei:placeName[not(parent::tei:address or parent::tei:birth or parent::tei:death)]">
<report test="matches(.,'^\s') and (node()[1] = text()[1])">whitespace at the beginning of element <name/>
</report>
</rule>
</pattern>
<pattern id="schematron-constraint-wegaPlaces-untrimmedAttributeValues-43">
<pattern id="schematron-constraint-wegaPlaces-untrimmedAttributeValues-47">
<rule context="*[@*]">
<report test="some $i in @* satisfies string-length(normalize-unicode(normalize-space(replace($i, ' | | | ', ' ')))) ne string-length($i)">There is some whitespace here at the beginning or end of some attribute value.</report>
</rule>
</pattern>
<pattern id="schematron-constraint-wegaPlaces-wegaTargets-44">
<pattern id="schematron-constraint-wegaPlaces-wegaTargets-48">
<rule context="*[starts-with(@target, 'wega:')]">
<assert test="matches(@target, '^wega:A[0-9A-F]{6}(#.+)?(\s+wega:A[0-9A-F]{6}(#.+)?)*$')">"wega"-prefixed URIs must follow the pattern "wega:A002068" (i.e. without any file extension)</assert>
</rule>
</pattern>
<pattern id="schematron-constraint-wegaPlaces-emojiCheck-45">
<pattern id="schematron-constraint-wegaPlaces-emojiCheck-49">
<rule context="*[some $i in text() satisfies normalize-space($i) ne '']">
<report test="matches(., '[⌚-⌛]|[⏩-⏬]|[⏰]|[⏳]|[◽-◾]|[☔-☕]|[♈-♓]|[♿]|[⚓]|[⚡]|[⚪-⚫]|[⚽-⚾]|[⛄-⛅]|[⛎]|[⛔]|[⛪]|[⛲-⛳]|[⛵]|[⛺]|[⛽]|[✅]|[✊-✋]|[✨]|[❌]|[❎]|[❓-❕]|[❗]|[➕-➗]|[➰]|[➿]|[⬛-⬜]|[⭐]|[⭕]|[🀄]|[🃏]|[🆎]|[🆑-🆚]|[🇦-🇿]|[🈁]|[🈚]|[🈯]|[🈲-🈶]|[🈸-🈺]|[🉐-🉑]|[🌀-🌠]|[🌭-🌯]|[🌰-🌵]|[🌷-🍼]|[🍾-🍿]|[🎀-🎓]|[🎠-🏄]|[🏅]|[🏆-🏊]|[🏏-🏓]|[🏠-🏰]|[🏴]|[🏸-🏿]|[🐀-🐾]|[👀]|[👂-📷]|[📸]|[📹-📼]|[📿]|[🔀-🔽]|[🕋-🕎]|[🕐-🕧]|[🕺]|[🖕-🖖]|[🖤]|[🗻-🗿]|[😀]|[😁-😐]|[😑]|[😒-😔]|[😕]|[😖]|[😗]|[😘]|[😙]|[😚]|[😛]|[😜-😞]|[😟]|[😠-😥]|[😦-😧]|[😨-😫]|[😬]|[😭]|[😮-😯]|[😰-😳]|[😴]|[😵-🙀]|[🙁-🙂]|[🙃-🙄]|[🙅-🙏]|[🚀-🛅]|[🛌]|[🛐]|[🛑-🛒]|[🛕]|[🛫-🛬]|[🛴-🛶]|[🛷-🛸]|[🛹]|[🛺]|[🟠-🟫]|[🤍-🤏]|[🤐-🤘]|[🤙-🤞]|[🤟]|[🤠-🤧]|[🤨-🤯]|[🤰]|[🤱-🤲]|[🤳-🤺]|[🤼-🤾]|[🤿]|[🥀-🥅]|[🥇-🥋]|[🥌]|[🥍-🥏]|[🥐-🥞]|[🥟-🥫]|[🥬-🥰]|[🥱]|[🥳-🥶]|[🥺]|[🥻]|[🥼-🥿]|[🦀-🦄]|[🦅-🦑]|[🦒-🦗]|[🦘-🦢]|[🦥-🦪]|[🦮-🦯]|[🦰-🦹]|[🦺-🦿]|[🧀]|[🧁-🧂]|[🧃-🧊]|[🧍-🧏]|[🧐-🧦]|[🧧-🧿]|[🩰-🩳]|[🩸-🩺]|[🪀-🪂]|[🪐-🪕]')">Text contains characters with Emoji presentation as default.</report>
</rule>
</pattern>
<pattern id="schematron-constraint-wegaPlaces-sourceMustResolve-46">
<pattern id="schematron-constraint-wegaPlaces-sourceMustResolve-50">
<rule context="*[starts-with(@source, '#')]">
<let name="source" value="@source"/>
<assert test="id(substring($source,2))">Unable to locate the reference provided by the @source attribute.</assert>
</rule>
</pattern>
<pattern id="schematron-constraint-wegaPlaces-anonymus-id-47">
<pattern id="schematron-constraint-wegaPlaces-anonymus-id-51">
<rule context="*[@key|@codedval]">
<report test="(@key | @codedval) = 'A007979'">Please do not link to the anonymus ID.</report>
</rule>
</pattern>
<pattern id="schematron-constraint-wegaPlaces-att.wega.rend-underline-n-48">
<pattern id="schematron-constraint-wegaPlaces-att.wega.rend-underline-n-52">
<rule context="*:hi[@n] | *:rend[@n]">
<report test="@rend ne 'underline'">The @n-attribute is only supported in combination with @rend='underline'</report>
</rule>
Expand Down
4 changes: 3 additions & 1 deletion schema/de/wegaPlaces.rng
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://www.tei-c.org/ns/1.0"><!--
Schema generated from ODD source 2022-12-08T13:47:50Z. .
Schema generated from ODD source 2023-01-12T15:50:18Z. .
TEI Edition: Version 4.5.0. Last updated on
25th October 2022, revision 3e98e619e
TEI Edition Location: https://www.tei-c.org/Vault/P5/Version 4.5.0/
Expand Down Expand Up @@ -3178,6 +3178,8 @@ Empfohlene Werte sind: 1] deprecationInfo (deprecation information)</a:documenta
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(Fluss, See, …) </a:documentation>
<value>L</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(Park, Anlage, …) </a:documentation>
<value>R</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(Strasse, Eisenbahn) </a:documentation>
<value>S</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(Gebäude, Farm, …) </a:documentation>
<value>T</value>
Expand Down
4 changes: 3 additions & 1 deletion schema/en/wegaPlaces.rng
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://www.tei-c.org/ns/1.0"><!--
Schema generated from ODD source 2022-12-08T13:47:56Z. .
Schema generated from ODD source 2023-01-12T15:50:32Z. .
TEI Edition: Version 4.5.0. Last updated on
25th October 2022, revision 3e98e619e
TEI Edition Location: https://www.tei-c.org/Vault/P5/Version 4.5.0/
Expand Down Expand Up @@ -3178,6 +3178,8 @@ Suggested values include: 1] deprecationInfo (deprecation information)</a:docume
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(stream, lake, …) </a:documentation>
<value>L</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(parks, area, …) </a:documentation>
<value>R</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(road, railroad) </a:documentation>
<value>S</value>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(spot, building, farm) </a:documentation>
<value>T</value>
Expand Down
4 changes: 4 additions & 0 deletions src/Specs/common-specs.odd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,10 @@
<gloss versionDate="2022-10-24" xml:lang="en">parks, area, …</gloss>
<gloss versionDate="2022-10-24" xml:lang="de">Park, Anlage, …</gloss>
</valItem>
<valItem ident="R">
<gloss versionDate="2023-01-12" xml:lang="en">road, railroad</gloss>
<gloss versionDate="2023-01-12" xml:lang="de">Strasse, Eisenbahn</gloss>
</valItem>
<valItem ident="S">
<gloss versionDate="2022-10-24" xml:lang="en">spot, building, farm</gloss>
<gloss versionDate="2022-10-24" xml:lang="de">Gebäude, Farm, …</gloss>
Expand Down

0 comments on commit cbf32f0

Please sign in to comment.