The|xou filter [1] (since SPIP 2.0) is used to check the existence of only one single element out of 2 possibles.

Wikipedia offers a complete definition of the Exclusive OR.

[(#CHAPO|xou{#PS}) Either there is a stand-first, or a post-scriptum, but never both]
[(#CHAPO|xou{#PS}|non) There can be neither stand-first nor post-scriptum, or there can be both at the same time]

See also the |et and |ou filters.


[1This can also be written as |xor

Author Mark Published : Updated : 26/10/12

Translations : català, English, Español, français, Nederlands