Help:Type URL

URL is a built-in datatype of Semantic MediaWiki that is used for the most common kinds of URLs, URNs, and URIs. It accepts almost any string and interprets it as a URL. The URL appears as a link in text and the Factbox.

Technically speaking, e-mail addresses and even telephone numbers are also kinds of URLs. There are special datatypes for these kind of data values that should be used in such cases: and.

is a specialized variant of this datatype.

introduced setting the list of permissive permissive URI schemes for data values to allow for better validation.

Text vs. URL
MediaWiki will generally display a property of that starts with  http://  or  https://  as a hyperlink. However, strings do not check the validity of the input as a URL, and URLs have different meaning in RDF export, so it is generally recommended to use Type:URL if applicable.

The URL type denotes that it is a reference to something else. The ontology language OWL DL that we use as an export format uses many URIs for identifying its language constructs. But it is not desirable to make new statements about those language constructs. For example, you clearly do not want to declare owl:sameAs, the property that specifies that two individuals refer to the same concept, as the capital of Germany! For this reason, the datatype Type:URL disallows certain URIs that already have a predefined meaning that cannot be used without changing the output format of the whole wiki. The corresponding URI ranges are specified by the MediaWiki system message MediaWiki:smw_uri_blacklist which can be extended by wiki-administrators. URIs from those ranges will be rejected by the wiki, but this will not have any effect on normal usage where URIs typically just point to some web-resource, such as an HTML or image document.

Searching within values
Since the first 40 characters (if more than 72 characters were stored as property value) or all 72 characters (if a maximum of 72 characters were stored as property value) are searchable as explained on the help page about selecting pages.CiteRef::mail:user:smw:tp5020618p5020801 Searching within property values was not possible in earlier versions of Semantic MediaWiki (≤ 1.7.1).

With a full-text search featureCiteRef::gh:smw:1481 was introduced which allows to search with in more than just the maximum of 72 characters as described before.

again introduced with it's option  CiteRef::gh:smw:2536 making it possible to extend the searchable length as described here to 300 charactersCiteRef::so:3489041 without relying on the full-text search feature.

Displaying results
There is one output format  available which is specific to this datatype. It escapes the URL and displays it as a plain string. This is useful if you e.g. want to generate links containing text on the page with the query result. See the help page on displaying information for further information on this.