Difference between revisions of "Template:Validate and render identifier URI"

From TDWG Terms Wiki
Jump to: navigation, search
m (fix output)
m (debug)
Line 24: Line 24:
 
else namespace URI may one of:
 
else namespace URI may one of:
 
   two (import + defined) / just the defined / just the import / none
 
   two (import + defined) / just the defined / just the import / none
-->|{{#switch: <!--
+
-->|<div style="display:none;">debug: case is "{{#if: {{#var: importNamespaceUri}}|importURI}}<!--
 +
  -->{{#if: {{#var: namespaceURIpageList}}<!--
 +
      check e.g. "(http://rs.tdwg.org/ac/terms/)"
 +
    -->|{{#if: {{#pos: ({{#var: importNamespaceUri}})|{{#var: namespaceURIpageList}} }}<!--
 +
      -->|_is_definedURI<!--
 +
        -->|{{#if: {{#var: importNamespaceUri}} <!--
 +
        -->|_conflicts_with_definedURI<!--
 +
          no importURI just a definedURI
 +
        -->|definedURI}}
 +
        }}<!--
 +
    -->|<!--
 +
      no defined URI
 +
      -->}}"</div>{{#switch: <!--
 
     return switch string for cases     
 
     return switch string for cases     
 
   -->{{#if: {{#var: importNamespaceUri}}|importURI}}<!--
 
   -->{{#if: {{#var: importNamespaceUri}}|importURI}}<!--
Line 46: Line 58:
 
       |concept namespace prefix={{{namespace prefix|}}}
 
       |concept namespace prefix={{{namespace prefix|}}}
 
     }}{{#vardefine: hasConflict | 1 }}
 
     }}{{#vardefine: hasConflict | 1 }}
   | importURI_is_definedURI={{#switch: {{lc: {{{return value|}}}}}
+
   |importURI_is_definedURI={{#switch: {{lc: {{{return value|}}}}}
 
     |page and uri= {{#replace: {{#var: namespaceURIpageList}} | ) | {{#explode: {{{concept page|{{PAGENAME}}}}}|:|1}}) }}
 
     |page and uri= {{#replace: {{#var: namespaceURIpageList}} | ) | {{#explode: {{{concept page|{{PAGENAME}}}}}|:|1}}) }}
 
     |uri={{#var: importNamespaceUri}}{{#explode: {{{concept page|{{PAGENAME}}}}}|:|1}}
 
     |uri={{#var: importNamespaceUri}}{{#explode: {{{concept page|{{PAGENAME}}}}}|:|1}}

Revision as of 12:39, 25 October 2012

Technical documentation

Dependent on: Template:Warning about conflict of concept URI with SMW import and Concept or Collection

Sets management category: Category: Check semantic properties (suppressed by parameter "set management category=no")

Uses variables: hasConflict, importNamespaceUri, namespaceURIpageList