Module:Cartesian with comma/doc
From Ross Surname Project
More actions
This is the documentation page for Module:Cartesian with comma
| This is a documentation subpage for Module:Cartesian with comma. It contains usage information, categories and other content that is not part of the original module page. |
This module computes and returns the cartesian product of multiple input sets (i.e., lists of strings), and then formats and combines the results into a single output string. Because this module was original developed to deal with locations, if a value in the first set contains a comma, a comma will be added to the end of that value before it is combined with a value from the second set.
Example
It is called by {{Combine categories}} to create category names from a list of locations and a list of topics.
{{#invoke:Cartesian categories|combine
| {{{location}}}
| {{lc:{{{locality_subjects}}}}}
| format = [[Category:%s %s]]
}}
Input:
{{Combine categories
|location=Bucks County, Pennsylvania;Chester County, Pennsylvania;Pennsylvania
|locality_subjects=Court records;Probate records;Vital records
}}Output:
[[Category:Pennsylvania court records]] [[Category:Pennsylvania probate records]] [[Category:Pennsylvania vital records]] [[Category:Bucks County, Pennsylvania, court records]] [[Category:Bucks County, Pennsylvania, probate records]] [[Category:Bucks County, Pennsylvania, vital records]] [[Category:Chester County, Pennsylvania, court records]] [[Category:Chester County, Pennsylvania, probate records]] [[Category:Chester County, Pennsylvania, vital records]]
See also
Acknowledgements
Original code provided by Alexander Mashin.