帮助:数据类型“URL”

From Linux Web Expert

URL
Holds URIs, URNs and URLs
更多信息
提供者: Semantic MediaWiki
添加版本: 1.0
移除版本: still in use
数据类型ID: _uri
此wiki内: 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: datatype "Email"Holds e-mail addresses and datatype "Telephone number"No description was provided..

Datatype "Annotation URI"Holds URIs, but has some technical differences during export compared to the "URL" type is a specialized variant of this datatype.

Semantic MediaWiki 3.0.0Released on an unknown date unknown versions of MediaWiki introduced configuration parameter $smwgURITypeSchemeListSets the permissive URI schemes for data values to properties of datatype URL and Annotation URI setting the list of permissive permissive URI schemes for data values to allow for better validation.

选择Text还是URL

MediaWiki will generally display a property of datatype "Text"Holds text of arbitrary length 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.

在值内搜索

Since Semantic MediaWiki 1.8.0Released on an unknown date unknown versions of MediaWiki 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.1 Searching within property values was not possible in earlier versions of Semantic MediaWiki (≤ 1.7.1).

With Semantic MediaWiki 2.5.0Released on an unknown date unknown versions of MediaWiki a full-text search feature2 was introduced which allows to search with in more than just the maximum of 72 characters as described before.

Semantic MediaWiki 3.0.0Released on an unknown date unknown versions of MediaWiki again introduced configuration parameter $smwgFieldTypeFeaturesSets relational database specific field type features with it's option SMW_FIELDT_CHAR_LONG3 making it possible to extend the searchable length as described here to 300 characters4 without relying on the full-text search feature.

显示结果

There is one output format NOWIKI 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.

示例

API example

<ul><li>The part "|URL" of the query was not understood.Results might not be as expected.</li> <!--br--><li>The part "]]" of the query was not understood.Results might not be as expected.</li></ul>

另见