Difference between revisions of "Template:Concept collection"

From Multilingual Bookbinding Dictionary
Jump to navigation Jump to search
Line 1: Line 1:
<includeonly>{{#set: dc:title={{PAGENAME}}}}<!--
+
<includeonly><!--
 
 
 
Start output with INFOBOX
 
Start output with INFOBOX
 
--><table class="infobox floatright" style="max-width:300px"><!--
 
--><table class="infobox floatright" style="max-width:300px"><!--
Line 36: Line 35:
 
<nowiki></nowiki>}}{{
 
<nowiki></nowiki>}}{{
 
#if: {{{collection uri|}}}|<nowiki></nowiki>
 
#if: {{{collection uri|}}}|<nowiki></nowiki>
 
 
'''Collection URI:''' {{{collection uri}}}
 
'''Collection URI:''' {{{collection uri}}}
}}{{
 
#if: {{{preferred namespace uri|}}}|''Namespace URI'': {{{preferred namespace uri|}}}{{#set: preferredNamespaceUri={{{preferred namespace uri|}}}}}{{#if: {{{preferred namespace prefix|}}}|<nowiki></nowiki> with preferred namespace prefix “[[preferredNamespacePrefix::{{{preferred namespace prefix|}}}]]”}}.
 
 
<nowiki></nowiki><!--
 
-->{{#vardefine: preferredNamespacePrefixes | {{#ask: [[vann:preferredNamespacePrefix::{{{preferred namespace prefix|}}}]] | mainlabel=- | link=none | ?vann:preferredNamespacePrefix#= | format=list | default=}} }}<!--
 
-->{{#vardefine: preferredNamespaceUris | {{#ask: [[vann:preferredNamespacePrefix::{{{preferred namespace prefix|}}}]] [[vann:preferredNamespaceUri::+]] | mainlabel=- | link=none | ?vann:preferredNamespaceUri#= | format=list | default=}} }}<!--
 
 
  check namespace conflict: ERROR message
 
-->{{#if: {{{preferred namespace prefix|}}} | {{#ifeq: {{#var: preferredNamespacePrefixes}} | {{{preferred namespace prefix|}}} <!--
 
then-->|<!-- nothing
 
else-->|{{Warning about non-unique namespace prefix
 
|concept namespace prefix={{{preferred namespace prefix|}}}
 
}}
 
[[Category: Check semantic properties]]
 
 
}}
 
}}
}}<!--
 
  
  check URI conflict: ERROR message
+
{{#ask: [[{{PAGENAME}}]] [[Category:Concept]]|format=count}} |{{#if: {{{concept scheme|}}}<!--  
-->{{Validate and render identifier URI | namespace prefix={{{preferred namespace prefix|}}} }}
 
}}<!-- end preferred namespace URI
 
-->{{
 
#ifexpr: {{#ask: [[{{PAGENAME}}]] [[Category:Concept]]|format=count}} <!-- 0 interpreted as false
 
then-->|{{#if: {{{concept scheme|}}}<!--  
 
 
then-->|'''This is a collection within the [[{{{concept scheme|}}}]]. It <!--
 
then-->|'''This is a collection within the [[{{{concept scheme|}}}]]. It <!--
 
else-->|'''This collection <!--
 
else-->|'''This collection <!--
Line 72: Line 50:
 
| intro='''By concept name:'''&#32;
 
| intro='''By concept name:'''&#32;
 
| sort=terms-internal:lowercasePagename
 
| sort=terms-internal:lowercasePagename
}}<!--
+
}}
else-->|'''This collection contains no concepts yet.'''<!--
 
-->}}<!--
 
 
 
If the present collection has sub-collections, list those:
 
  -->{{#vardefine: n-sub-collections | {{#ask: [[Category:Concept]] [[skos:Collection::{{PAGENAME}}]]|format=count}}}}<!--
 
  -->{{#ifexpr: {{#var: n-sub-collections}}<!-- 0 → false; > 1 true
 
  then-->|<nowiki></nowiki>
 
 
 
 
 
----
 
 
 
 
 
'''{{PAGENAME}} has {{plural: {{#var: n-sub-collections}}|a sub-collection|several sub-collections}}:''' {{#ask: [[Category:Concept collection]] [[{{PAGENAME}}]]|format=ul}}<!--
 
  -->}}<!-- end ifexpr
 
 
 
If present collection is a subcollection, list sibling collections in the same subcollection:
 
-->{{#if: {{{concept collection|}}}|<!--
 
-->{{#vardefine: n-collections |{{#ask: [[Category:Concept collection]] [[{{{concept collection|}}}]] |format=count}} }}<!--
 
--><nowiki></nowiki>
 
 
 
 
 
----
 
 
 
 
 
'''This concept collection is itself member of collection [[{{{concept collection|}}}]]. {{#ifexpr: {{#var: n-collections}} > 1 | {{{concept collection|}}} contains the following collections (sibling collections):''' <!--
 
  -->{{#ask: [[Category:Concept collection]] [[skos:inScheme::{{{concept scheme|}}}]] [[{{{concept collection|}}}]] |format=ul}}<!--
 
-->}}
 
}}<!-- end if subcollection -->
 
 
 
{{#if: {{{concept scheme|}}}||'''Note: No “concept scheme” has been specified (yet) that belongs to this collection.'''}}
 
 
 
 
 
 
[[Category:Concept collection]]
 
[[Category:Concept collection]]
 
</includeonly><noinclude>
 
</includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 14:45, 12 December 2020

[edit] [[[:Template:Purge]]] Template-info.svg Template documentation

This is the "Concept collection" template and should be used on Category-pages.

Usage

It should be called in the following format:

{{Concept collection
|description=                 → optional (property:dc:description)
|notes=                       → optional (property:skos:note)
|concept collection=          → optional member of another collection (property:vann:termGroup)
|concept scheme =             → optional (property: skos:inScheme)
|collection uri =             → optional canonical URI where collection is used as a class (esp. value lists)
|preferred namespace prefix=  → optional (property: vann:preferredNamespacePrefix)
|preferred namespace uri=     → optional (property: vann:preferredNamespaceUri)
}}

Technical documentation

This template is used by Form:Concept collection. Dependencies:

Additional properties/Classes

See also