Template:SemanticInputParser/doc

Summary
This template is a designed for inputting a single set of data into single value semantic properties. It allows for customizable rules such as Regular Expressions, data delimiters and 9 types of linking options.

Description

 * value: This is the value passed into the template to be parsed according to the variables LineDelim, SameLineDelim, RegexPrepend, RegexAppend. It also displays a error if the parsed data does not match RegexLineCodition.
 * SemanticPropertyName: This is the name of the semantic property to assign the parsed data to
 * SearchByProperty: This boolean property creates a search icon if there are the same values for the this property
 * SemanticPropertyUnit: This is the unit of the semantic property to automatically add
 * linkOptions:
 * default, show no link if the page does not exist
 * none, never show a link
 * hide, store data only, do not show
 * always, always show a link
 * Semantic Unit, Show the input with the semantic unit using the display units on the property page.
 * Wikipedia, link to wikipedia if does not exist on this wiki
 * Form:FormName, if there is no page of this name on the wiki, create a form link.
 * Query Form:FormName:TemplateName[FieldName]
 * Template:TemplateName, pass the parsed value directly into a template
 * RegexLineCondition: This sets a regex condition for each item on a line, this field is provided due to users ability to input in ways other than a regex form input.
 * SemanticPropertyRegexOverride: Setting this to 'yes', will always displays the input; but it will prevent an improper value from being entered into the semantic property.
 * RegexPrepend: This sets a regex condition for the beginning part of the line to not include in the parsing.
 * RegexPrependTemplate: This is a optional user defined template (using the variable ) to pass the prepended regex text through.
 * RegexAppend: This sets a regex condition for the ending part of the line to not include in the parsing.
 * RegexAppendTemplate: This is a optional user defined template (using the variable ) to pass the appended regex text through.
 * PrependText: This value is inserted in front of a line item
 * PrependTemplate: This is a optional user defined template to send the parsed data through, it is displayed before the parsed data. The first value passed is the parsed value, while the second value passed is the variable PrependText.
 * AppendText: This value is inserted behind a line item
 * AppendTemplate: This is a optional user defined template to send the parsed data through, it is displayed after the parsed data. The first value passed is the parsed value, while the second value passed is the variable AppendText.

Requirements

 * 1) http://www.mediawiki.org/wiki/Extension:Regex_Fun
 * 2) http://www.mediawiki.org/wiki/Extension:Variables
 * 3) http://www.mediawiki.org/wiki/Extension:Semantic_Forms (#arraymap parser)
 * 4) http://www.mediawiki.org/wiki/Extension:Semantic_MediaWiki
 * Template:!

Samples
These are some samples using this template and its child template Template:SemanticInputParser/Array.


 * Specify a single value, a single time while also incorporating a icon with the given value.


 * Only allow digits (including decimal) (from any script)


 * Only allow Japanese Kanji, Spaces or Punctuation


 * Do not interpret end of text as part of value


 * Do not interpret start of text as part of parsed value, also add measurement units using semantic property


 * You can manipulate the data before sending it to the template, this removes all data after the first ~


 * Manually add Part I, or Part II as needed in front of separate variables


 * Add italics around parsed value


 * Add a line as a title using the ~ delimiter, also uses RegexPrepend for ul lists


 * Change the delimiter between data, also uses RegexPrepend for ul lists


 * You can define a template and pass the result of a RegexAppend or RegexPrepend to it

From: "Template:SomeTemplateName"


 * Insert template inside another template to create two columns for infobox (no css)


 * Insert template inside another template to create two columns for infobox