In its section "7.2.4.5 Layers and styles" (page 24), the [WMS 1.3.0 spec](https://portal.ogc.org/files/?artifact_id=14416) says: > **Each available map is advertised by a <Layer> element in the service metadata.** Conceptually, each Layer is a distinct entity. However, as a means of classifying and organizing layers, and as a means of reducing the size of the service metadata, **a single parent Layer** may enclose any number of additional layers, which may be hierarchically nested as desired. Some properties defined in **a parent layer** are inherited by the children it encloses. These inherited properties may be either redefined or added to by the child. Subclause 7.2.4.8 summarizes whether or how each property is inherited. > > **A server shall include at least one <Layer> element for each map layer offered.** If desired, layers may be repeated in different categories (i.e. enclosed in more than one parent <Layer>) when relevant. _(emphases mine)_ In my opinion, this wording is somewhat ambiguous, or at least doesn't explicitly _disallow_ more than one top-most `<Layer>`. However, on page 63, the Annex E -- which is explicitly declared as _normative_ -- gives the XML schema as: ```xml <sequence> <element ref="wms:Request"/> <element ref="wms:Exception"/> <element ref="wms:_ExtendedCapabilities" minOccurs="0" maxOccurs="unbounded"/> <element ref="wms:Layer" minOccurs="0"/> </sequence> ``` As per [this answer](https://stackoverflow.com/a/4822925/3746543), the default value for `maxOccurs` is 1, so the answer can be given as a clear **NO.** No, the element is not allowed multiple times there; no, the sample XML is not valid; and no, this is not a bug in OpenLayers. QGIS probably works around it anyway so that servers can be used even when they are not 100% compliantly implemented. ODC OWS should probably give a warning when configured like this, or wrap the whole thing in an additional `<Layer>...</Layer>` if it encounters more than one top-most layer in the user-supplied config.