Template:CombineDateMapping: Difference between revisions

From Mediawiki1
Jump to navigationJump to search
(Created page with '<table class="wikitable"> <tr><th style="text-align:left" colspan="2">Calculate Mapping <small>([[Writing_Mappings/Templates#Custom_Mappings|<span style="cursor:help;">help</span...')
 
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<table class="wikitable">
<includeonly><table class="wikitable">
<tr><th style="text-align:left" colspan="2">Calculate Mapping <small>([[Writing_Mappings/Templates#Custom_Mappings|<span style="cursor:help;">help</span>]])</small>
<tr><th style="text-align:left" colspan="2">Combine Date Mapping <small>([[Template:CombineDateMapping|<span style="cursor:help;">help</span>]])</small>
</th></tr>
</th></tr>
{{#if:{{{templateProperty1|}}}|<tr>
{{#if:{{{templateProperty1|}}}|<tr>
Line 8: Line 8:
{{#if:{{{unit1|}}}|<tr>
{{#if:{{{unit1|}}}|<tr>
<td width="200px">template property unit 1</td>
<td width="200px">template property unit 1</td>
<td width="350px">{{{unit1}}}</td>
<td width="350px">[[Datatype:{{{unit1}}}|{{{unit1}}}]]</td>
</tr>}}
</tr>}}
{{#if:{{{templateProperty2|}}}|<tr>
{{#if:{{{templateProperty2|}}}|<tr>
Line 16: Line 16:
{{#if:{{{unit2|}}}|<tr>
{{#if:{{{unit2|}}}|<tr>
<td width="200px">template property unit 2</td>
<td width="200px">template property unit 2</td>
<td width="350px">{{{unit2}}}</td>
<td width="350px">[[Datatype:{{{unit2}}}|{{{unit2}}}]]</td>
</tr>}}
</tr>}}
{{#if:{{{templateProperty3|}}}|<tr>
{{#if:{{{templateProperty3|}}}|<tr>
Line 24: Line 24:
{{#if:{{{unit3|}}}|<tr>
{{#if:{{{unit3|}}}|<tr>
<td width="200px">template property unit 3</td>
<td width="200px">template property unit 3</td>
<td width="350px">{{{unit3}}}</td>
<td width="350px">[[Datatype:{{{unit3}}}|{{{unit3}}}]]</td>
</tr>}}
</tr>}}
{{#if:{{{ontologyProperty|}}}|<tr>
{{#if:{{{ontologyProperty|}}}|<tr>
<td> ontology property</td>
<td> ontology property</td>
<td>[[OntologyProperty:{{#replace:{{{ontologyProperty}}}|:|/}}]]</td>
<td>[[OntologyProperty:{{#replace:{{{ontologyProperty}}}|:|%2F}}|{{{ontologyProperty}}}]]</td>
</tr>}}
</tr>}}
</table>
</table></includeonly>
<noinclude>'''<nowiki>{{CombineDateMapping}}</nowiki>''' maps up to three template properties containing date values to ontology properties. It can combine several values to one date value.
 
=== Usage ===
 
<pre>
{{CombineDateMapping
| templateProperty1 =
| unit1            =
| templateProperty2 =
| unit2            =
| templateProperty3 =
| unit3            =
| ontologyProperty  =
}}
</pre>
 
=== Example ===
 
<pre>
{{CombineDateMapping
| templateProperty1 = debutdate 
| unit1            = xsd:gMonthDay
| templateProperty2 = debutyear 
| unit2            = xsd:gYear
| templateProperty3 =
| unit3            =
| ontologyProperty  = activeYearsStartDate
}}
</pre>

Latest revision as of 17:16, 6 August 2015

{{CombineDateMapping}} maps up to three template properties containing date values to ontology properties. It can combine several values to one date value.

Usage

{{CombineDateMapping
| templateProperty1 = 
| unit1             = 
| templateProperty2 = 
| unit2             = 
| templateProperty3 = 
| unit3             = 
| ontologyProperty  = 
}}

Example

{{CombineDateMapping
| templateProperty1 = debutdate  
| unit1             = xsd:gMonthDay
| templateProperty2 = debutyear  
| unit2             = xsd:gYear
| templateProperty3 = 
| unit3             = 
| ontologyProperty  = activeYearsStartDate 
}}