Help:Type String

From semantic-mediawiki.org
Jump to: navigation, search
String
Holds character sequences up to 255 characters
Further Information
Provided by: Semantic MediaWiki
Added in version: 1.0
Removed in version: 1.7.1
Table of Contents

The datatype String is used for simple words and similar character sequences. It has the following restrictions:

  • If you want to store special character sequences like "::", you need to store them using the parser function #set, instead of with the more standard "[[Property::value]]" notation.
  • Values cannot be longer than 255 characters (if you use non-Latin characters, this number might be smaller). For longer strings, use datatype "Text" instead.

You can use some wiki markup inside a string property such as runs of ' for bold and italic, and the markup will change the appearance of the string. You cannot embed semantic annotations inside a string property.

Restricting values

You can use the special property "Allows value" to restrict a property to a particular set of values. For example you could limit a property like "Status" to values like "Active", "Pending", etc.

Compatibility note

Since Semantic MediaWiki 1.8.0 this datatype is depreciated for SMWSQLStore3 and was removed entirely with Semantic MediaWiki 1.9.0 where this datatype remains to be just an alias of datatype "Text". Note that this alias will also be removed in a later version of Semantic MediaWiki, most likely in version Semantic MediaWiki 3.0. Thus you are advised to change the datatype declaration of property pages from datatype "String" to "Text".



This documentation page applies to all SMW versions from 1.0 to 1.7.1.
      Other languages: dezh-hans

Help:Type String en 1.0 1.7.1