Hyphenize tags containing spaces, per page in collection

@brigaill, To extend on my previous answer which was for a single page, the following is per page in a collection of pages.

// child1:  default.md

taxonomy:
    tag: [a, b, hyphenize me, c]
// child2:  default.md

taxonomy:
    tag: [x, y, hyphenize me, z]
// Twig

{# For each 'child' of current 'page' #}
{% for child in page.children %}

    {% set tags = [] %}

    {# Step 1: Hyphenise each tag of 'child' and add to array of tags #}
    {% for tag in child.taxonomy.tag %}
        {% set hyphenisedTag = tag|hyphenize %}
        {% set tags = tags|merge([hyphenisedTag]) %}
    {% endfor %}

    {# Step 2: Join array of hyphenised tags #}
    {% set filter = tags|join(' ') %}
    <li data-filter="{{ filter }}"></li>

{% endfor %}
// Generated HTML

<li data-filter="a b hyphenize-me c"></li>
<li data-filter="x y hyphenize-me z"></li>