Module:Xpd/doc

This is an expansion demo, like Template:Xpd, but used through Template:Xpds and Template:Xpdp, to start the result of the template, variable or parser function call on the same line or in a new paragraph (the choice is in particular important if the rendering of the resulting wikitext depends on this, such as in the case of a table or list). For parameters with explicit positive integer names the integer is reduced by 1 in the result (just like for implicit names, due to the position taken by the template name in the calls of the templates xpds and xpdp).

Without affecting the result a template call is written in a normalized form :
 * Values of named parameters are trimmed.
 * Definitions of parameters with implicit or explicit positive integer names are ordered in ascending order; explicit names among them are removed; these parameters are put before the remaining ones. Multiple definitions of the same parameter are replaced by the final one.
 * Expressions for parameter values are replaced by their result.

Limitations
The left-hand side does not show the wikitext but the rendering of the parameter values. This affects e.g. sequences of more than two spaces, and single newlines. Also link code is shown as a link.

gives:

Parameters with explicit or implicit positive integer names have to form a set {1, 2, .. k} without gaps. A template call with for example an undefined parameter 1 and a defined parameter 2 is not supported (where an undefined parameter should not be confused with a parameter which is assigned as value the empty string, these are supported). :

gives: