Difference between revisions of "Template:Concept to imported URI"

From TDWG Terms Wiki
Jump to: navigation, search
m (fix correct URI without prefix name space)
m (+default parameter when empty)
Line 21: Line 21:
 
-->{{#if: {{#var: importURI}}<!--
 
-->{{#if: {{#var: importURI}}<!--
 
   then-->|{{#var: importURI}}<!--
 
   then-->|{{#var: importURI}}<!--
   else-->|{{{1|unknown URI}}}<!--
+
   else-->|{{{default|{{{1|unknown URI}}}}}}<!--
 
-->}}<!-- end if
 
-->}}<!-- end if
  
Line 30: Line 30:
 
   [[my-URI-property::{{Concept to imported URI|dc:creator}}]]
 
   [[my-URI-property::{{Concept to imported URI|dc:creator}}]]
 
</pre>
 
</pre>
 +
{{Concept to imported URI|dcr:creator|default=}}
 
Notes:
 
Notes:
 
* an SMW import page, e.g. MediaWiki:Smw_import_<abbr title="impns=import name space (a locally defined import name space)">impns</abbr> must exist
 
* an SMW import page, e.g. MediaWiki:Smw_import_<abbr title="impns=import name space (a locally defined import name space)">impns</abbr> must exist

Revision as of 11:59, 23 October 2012

This template gets the Equivalent URI of an imported concept from its MediaWiki import page, e.g. MediaWiki:Smw_import_impns. This template can be used only for SMW data types URL and Annotation URI. If you have data type Page you can make SMW to resolve to ther external URI by pointing to the property page where the impoert must be defined there (=has a [[Imported from::impns:conceptTerm]]).

Usage:
  [[my-URI-property::{{Concept to imported URI|dc:creator}}]]

Notes:

  • an SMW import page, e.g. MediaWiki:Smw_import_impns must exist

Technical documentation

Uses variables:

  • #var importNameSpace
  • #var importURI

See also template: Concept to imported docURI.