        {% if layer.options.name is defined %}
        <Layer queryable="{%if layer.state.info%}1{%else%}0{%endif%}" hidden="{%if not layer.state.visibility%}1{%else%}0{%endif%}">
            <Server service="OGC:WMS" version="{% if source.configuration.version is defined %}{{ source.configuration.version }}{%else%}1.1.1{%endif%}" title="{% if source.configuration.title is defined %}{{ source.configuration.title }}{%else%}not defined{%endif%}">
                <OnlineResource xlink:type="simple" xlink:href="{{ source.configuration.options.url }}"/>
            </Server>
            <Name>{{ layer.options.name }}</Name>
            <Title>{{ layer.options.title }}</Title>
            {% if layer.options.abstract is defined %}
            <Abstract>{{ layer.options.abstract }}</Abstract>
            {% endif %}
            {% if source.srs is defined %}
            <SRS>{{ source.srs }}</SRS>
            {% endif %}
            <FormatList>
                <Format current="1">{{source.configuration.options.format}}</Format>
            </FormatList>
            <Extension>
                <mb3:transparent>{% if source.configuration.options.transparent %}true{% else %}false{% endif %}</mb3:transparent>
                <mb3:opacity>{{ source.configuration.options.opacity }}</mb3:opacity>
                <mb3:tiled>{{ source.configuration.options.tiled }}</mb3:tiled>
            </Extension>
        </Layer>
        {% endif %}
{% if layer.children is defined and layer.children|length > 0 %}
    {% for sublayer in layer.children %}
        {% include "MapbenderWmcBundle:Wmc:wmc110_layer.xml.twig"  with {'layer': sublayer, 'source': source }%}
    {% endfor %}
{% endif %}