<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
    <ns prefix="gml" uri="http://www.opengis.net/gml"/>
    <ns prefix="bldg" uri="http://www.opengis.net/citygml/building/2.0"/>
    
    <pattern>
        <rule context="//*:Building">
            <assert test="count(descendant::*:lod1Solid) &gt; 0 or count(descendant::*:lod2Solid) &gt; 0 or count(descendant::*:lod3Solid) &gt; 0 or count(descendant::*:lod4Solid) &gt; 0"><value-of select="@gml:id | @id"/>||||SE_ATTRIBUTE_MISSING||lodXsolid||false</assert>
        </rule>
        <rule context="//*:BuildingPart">
            <assert test="count(*:lod1Solid) = 1 or count(*:lod2Solid) = 1 or count(*:lod3Solid) = 1 or count(*:lod4Solid) = 1"><value-of select="ancestor::*:Building/@*:id"/>||<value-of select="@gml:id | @id"/>||SE_ATTRIBUTE_MISSING||lodXsolid||false</assert>
        </rule>
    </pattern>
</schema> 
