OSDN Git Service

#30840 不要になっていたTemplate:Documentation絡みの処理も除去,
[wptscs/wpts.git] / WptscsTest / Data / MediaWiki / en / Template_context.xml
1 <?xml version="1.0"?>
2 <api>
3   <query>
4     <normalized>
5       <n from="Template:context" to="Template:Context" />
6     </normalized>
7     <pages>
8       <page pageid="279373" ns="0" title="Template:Context">
9         <revisions>
10           <rev timestamp="2011-08-29T20:15:35Z" contentformat="text/x-wiki" contentmodel="wikitext" xml:space="preserve">&lt;includeonly&gt;&lt;!--
11  if not in a sub call, open paren, content span
12 --&gt;{{#if:{{{sub|}}}||&lt;span class=&quot;ib-brac&quot;&gt;&lt;span class=&quot;qualifier-brac&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;ib-content&quot;&gt;&lt;span class=&quot;qualifier-content&quot;&gt;}}&lt;!--
13  if label, generate it
14 --&gt;{{#if:{{{label|}}}|{{{label}}}}}&lt;!--
15  if special follows, generate it, no space at end or before explicit comma
16 --&gt;{{#switch:{{{1|x}}}|,=&lt;span class=&quot;ib-comma&quot;&gt;&lt;span class=&quot;qualifier-comma&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&amp;#32;|or=&amp;#32;or&amp;#32;|and=&amp;#32;and&amp;#32;|_={{#switch:{{{2|x}}}|,|=|&amp;#32;}}}}&lt;!--
17  do cats before recursion, so in order given; if in namespace 0, if topic category
18 --&gt;{{#switch:{{NAMESPACE}}|Appendix|={{#if:{{{topcat|}}}|{{#if:{{{skey|}}}|
19 [[Category:{{#if:{{{lang|}}}|{{{lang}}}:|en:}}{{{topcat|}}}|{{{skey}}} {{SUBPAGENAME}}]]{{#if:{{{script|}}}|[[Category:{{#if:{{{lang|}}}|{{{lang}}}:|en:}}{{{topcat|}}} in {{{script}}} script|{{{skey}}} {{SUBPAGENAME}}]]}}{{#if:{{{script2|}}}|[[Category:{{#if:{{{lang|}}}|{{{lang}}}:|en:}}{{{topcat|}}} in {{{script2}}} script|{{{skey2}}} {{SUBPAGENAME}}]]}}|
20 [[Category:{{#if:{{{lang|}}}|{{{lang}}}:|en:}}{{{topcat|}}}|{{SUBPAGENAME}}]]{{#if:{{{script|}}}|[[Category:{{#if:{{{lang|}}}|{{{lang}}}:|en:}}{{{topcat|}}} in {{{script}}} script|{{SUBPAGENAME}}]]}}{{#if:{{{script2|}}}|[[Category:{{#if:{{{lang|}}}|{{{lang}}}:|en:}}{{{topcat|}}} in {{{script2}}} script|{{SUBPAGENAME}}]]}}}}}}&lt;!--
21  if pos or pos-like cat
22 --&gt;{{#if:{{{poscat|}}}|{{#if:{{{skey|}}}|
23 [[Category:{{{{#if:{{{poscat|}}}|languagex|ns:0}}|{{#if:{{{lang|}}}|{{{lang}}}|en}}}} {{{poscat|}}}|{{{skey}}} {{SUBPAGENAME}}]]{{#if:{{{script|}}}|[[Category:{{{{#if:{{{poscat|}}}|languagex|ns:0}}|{{#if:{{{lang|}}}|{{{lang}}}|en}}}} {{{poscat|}}} in {{{script}}} script|{{{skey}}} {{SUBPAGENAME}}]]}}{{#if:{{{script2|}}}|[[Category:{{{{#if:{{{poscat|}}}|languagex|ns:0}}|{{#if:{{{lang|}}}|{{{lang}}}|en}}}} {{{poscat|}}} in {{{script2}}} script|{{{skey2}}} {{SUBPAGENAME}}]]}}|
24 [[Category:{{{{#if:{{{poscat|}}}|languagex|ns:0}}|{{#if:{{{lang|}}}|{{{lang}}}|en}}}} {{{poscat|}}}|{{SUBPAGENAME}}]]{{#if:{{{script|}}}|[[Category:{{{{#if:{{{poscat|}}}|languagex|ns:0}}|{{#if:{{{lang|}}}|{{{lang}}}|en}}}} {{{poscat|}}} in {{{script}}} script|{{SUBPAGENAME}}]]}}{{#if:{{{script2|}}}|[[Category:{{{{#if:{{{poscat|}}}|languagex|ns:0}}|{{#if:{{{lang|}}}|{{{lang}}}|en}}}} {{{poscat|}}} in {{{script2}}} script|{{SUBPAGENAME}}]]}}}}}}&lt;!--
25  regional templates
26 --&gt;{{#if:{{{regcat|}}}|{{#if:{{{skey|}}}|
27 [[Category:{{{regcat}}} {{{{#if:{{{regcat|}}}|languagex|ns:0}}|{{#if:{{{lang|}}}|{{{lang}}}|en}}}}|{{{skey}}} {{SUBPAGENAME}}]]{{#if:{{{script|}}}|[[Category:{{{regcat}}} {{{{#if:{{{regcat|}}}|languagex|ns:0}}|{{#if:{{{lang|}}}|{{{lang}}}|en}}}} in {{{script}}} script|{{{skey}}} {{SUBPAGENAME}}]]}}{{#if:{{{script2|}}}|[[Category:{{{regcat}}} {{{{#if:{{{regcat|}}}|languagex|ns:0}}|{{#if:{{{lang|}}}|{{{lang}}}|en}}}} in {{{script2}}} script|{{{skey2}}} {{SUBPAGENAME}}]]}}|
28 [[Category:{{{regcat}}} {{{{#if:{{{regcat|}}}|languagex|ns:0}}|{{#if:{{{lang|}}}|{{{lang}}}|en}}}}|{{SUBPAGENAME}}]]{{#if:{{{script|}}}|[[Category:{{{regcat}}} {{{{#if:{{{regcat|}}}|languagex|ns:0}}|{{#if:{{{lang|}}}|{{{lang}}}|en}}}} in {{{script}}} script|{{SUBPAGENAME}}]]}}{{#if:{{{script2|}}}|[[Category:{{{regcat}}} {{{{#if:{{{regcat|}}}|languagex|ns:0}}|{{#if:{{{lang|}}}|{{{lang}}}|en}}}} in {{{script2}}} script|{{SUBPAGENAME}}]]}}}}}}&lt;!--
29  fixed category
30 --&gt;{{#if:{{{cat|}}}|{{#if:{{{skey|}}}|
31 [[Category:{{{cat}}}|{{{skey}}} {{SUBPAGENAME}}]]|
32 [[Category:{{{cat}}}|{{SUBPAGENAME}}]]}}}} }}&lt;!--
33  if something follows that is a special, recall on next parameter (ignore case of special on the end)
34 --&gt;{{#if:{{{1|}}}| {{{{#switch:{{{1}}}|,|or|and|_=context {{#expr:{{{sub|0}}}+1}}|ns:0}}|sub={{#expr:{{{sub|0}}}+1}}|lang={{{lang|}}}|skey={{{skey|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}} }}&lt;!--
35  default case(s) from switch, we have a template or string, generate comma if we had a label
36 --&gt;{{#switch:{{{1}}}|,|or|and|_=|#default={{#if:{{{label|}}}|&lt;span class=&quot;ib-comma&quot;&gt;&lt;span class=&quot;qualifier-comma&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&amp;#32;}}&lt;!--
37  if template exists and is a context template, else call it, else call ourselves, avoid extra expansion by conditional on name
38 --&gt;{{ {{#if:{{{1|}}}|{{#if:{{#ifexist:Template:{{{1}}}|{{#ifeq:{{{{{1}}}|sub=}}|{{{{{1}}}|sub=1}}||+}}}}|{{{1}}}|context {{#expr:{{{sub|0}}}+1}}}}|ns:0}} |label={{{1}}}
39 |sub={{#expr:{{{sub|0}}}+1}}|lang={{{lang|}}}|skey={{{skey|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}} }}&lt;!--
40 --&gt;}}}}&lt;!-- end switch, if {1}
41  if not in sub, close content span, paren
42 --&gt;{{#if:{{{sub||}}}||&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;ib-brac&quot;&gt;&lt;span class=&quot;qualifier-brac&quot;&gt;)&lt;/span&gt;&lt;/span&gt;}}&lt;!--
43  now cat templates themselves, trick for only when sub is blank
44 --&gt;{{#ifeq:{{NAMESPACE}}{{{sub|}}}|{{ns:template}}|[[Category:{{ucfirst:{{{tcat|{{#if:{{{topcat|}}}|topical|
45 {{#if:{{{poscat|}}}|usage|
46 {{#if:{{{regcat|}}}|regional|
47 {{#ifeq:{{{1|}}}{{{2|}}}|_|qualifier}}}}}}}} }}} context labels}}|{{PAGENAME}}]]}}&lt;/includeonly&gt;&lt;noinclude&gt;{{documentation}}&lt;noinclude&gt;</rev>
48         </revisions>
49       </page>
50     </pages>
51   </query>
52 </api>