Template:Validate and render identifier URI

From Meta-Omics Data of Collection Objects
Jump to: navigation, search

This template checks for namespace URIs and returns them optionally. In case of multiple definitions or conflicting URIs it will print a warning message. This template has the following parameter (mandatory is bold), use it in the format:

{{Validate and render identifier URI
|namespace prefix=<!-- e.g. biorel -->
|concept page=<!-- optional (default is {{PAGENAME}}) -->
|set management category=<!-- optional: value may be any string, e.g. 
  "true", "1" ("0", "no", "false" is false) -->
|return value=<!-- optional: 
  "page and URI",
  "URI and page" or 
  "URI" (default return: void or a collapsible warning message box) -->
|info message=<!-- optional: message that appears after URI but before any warnings, e.g. for forms with {{#info: message=text}} -->
}}

Technical documentation

Note that #-ending URIs, like http://www.w3.org/2009/08/skos-reference/skos.html#, are cut off of the ending #, hence this templates eliminates ending #-URIs when testing. SemanticMediaWiki would show a vann:preferredNamespaceUri::http://www.w3.org/2004/02/skos/core# cut to

<vann:preferredNamespaceUri rdf:resource="http://www.w3.org/2004/02/skos/core"/>

… and not as trailing #

<vann:preferredNamespaceUri rdf:resource="http://www.w3.org/2004/02/skos/core#"/>

Dependent on:

Sets management category: Category: Internal - URI conflict (suppressed by parameter "set management category=no")

Uses variables: hasConflict, importNamespaceUri, namespaceURIpageList