Template:Xpd/doc: Difference between revisions

m
Text replacement - "|" to "|"
(added nowiki code to make the wanted templates go away until we actually do this in the Wiki)
m (Text replacement - "|" to "|")
 
Line 57: Line 57:


Examples:
Examples:
*<nowiki>{{xpd|1x| p{{=}}q }}</nowiki> gives {{xpd|1x| p{{=}}q }} - wrong result due to the template call in the parameter; is corrected by substitution and putting nowiki tags in the lefthand side (see below), giving {&#123;<code>1x<b>&#124;</b><nowiki> p{{=}}q</nowiki> </code>&#125;} gives {{1x| p{{=}}q }} [{{fullurl:special:ExpandTemplates|input=%7B%7B{{urlencode:1x{{!}} p{{=}}q } }}%7D}}].
*<nowiki>{{xpd|1x| p{{=}}q }}</nowiki> gives {{xpd|1x| p{{=}}q }} - wrong result due to the template call in the parameter; is corrected by substitution and putting nowiki tags in the lefthand side (see below), giving {&#123;<code>1x<b>|</b><nowiki> p{{=}}q</nowiki> </code>&#125;} gives {{1x| p{{=}}q }} [{{fullurl:special:ExpandTemplates|input=%7B%7B{{urlencode:1x{{!}} p{{=}}q } }}%7D}}].
*<nowiki>{{xpd|1x|2= p=q }}</nowiki> gives {{xpd|1x|2= p=q }} - wrong result because the lefthand side would be expanded interpreting p as named parameter, while the righthand side shows the result if the unnamed parameter of 1x has the given value; use <nowiki>{{xpdopec|1x|1|3= p=q }}</nowiki> giving <nowiki>{{xpdopec|1x|1|3= p=q }}</nowiki> or <nowiki>{{xpdnp|1x|1n=1|1v= p=q }}</nowiki> giving <nowiki>{{xpdnp|1x|1n=1|1v= p=q }}</nowiki> (spaces and newlines are trimmed).
*<nowiki>{{xpd|1x|2= p=q }}</nowiki> gives {{xpd|1x|2= p=q }} - wrong result because the lefthand side would be expanded interpreting p as named parameter, while the righthand side shows the result if the unnamed parameter of 1x has the given value; use <nowiki>{{xpdopec|1x|1|3= p=q }}</nowiki> giving <nowiki>{{xpdopec|1x|1|3= p=q }}</nowiki> or <nowiki>{{xpdnp|1x|1n=1|1v= p=q }}</nowiki> giving <nowiki>{{xpdnp|1x|1n=1|1v= p=q }}</nowiki> (spaces and newlines are trimmed).
*<nowiki>{{xpd|t np|q=s}}</nowiki> gives: <nowiki>{{xpd|t np|q=s}}</nowiki> ("q=s" is ignored); instead, use <nowiki>{{xpdopec|t np|q|s}}</nowiki> giving <nowiki>{{xpdopec|t np|q|s}}</nowiki> or <nowiki>{{xpdnp|t np|1n=q|1v=s}}</nowiki> giving <nowiki>{{xpdnp|t np|1n=q|1v=s}}</nowiki>.
*<nowiki>{{xpd|t np|q=s}}</nowiki> gives: <nowiki>{{xpd|t np|q=s}}</nowiki> ("q=s" is ignored); instead, use <nowiki>{{xpdopec|t np|q|s}}</nowiki> giving <nowiki>{{xpdopec|t np|q|s}}</nowiki> or <nowiki>{{xpdnp|t np|1n=q|1v=s}}</nowiki> giving <nowiki>{{xpdnp|t np|1n=q|1v=s}}</nowiki>.