schematronTest.xml 1.21 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
    <!-- semantic requirements SimStadt monthly energy balance -->
    <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 | //bldg:Building">
            <assert test="@gml:id | @id">Attribute gml:id is missing in one building. </assert>
            <assert test="count(lod1Solid) = 1"><value-of select="@gml:id | @id"/>: SE_MISSING_ELEMENT lod1Solid</assert>
            <assert test="count(yearOfConstruction) &gt;= 1"><value-of select="@gml:id | @id"/>: SE_MISSING_ELEMENT yearOfConstruction</assert>
            <assert test="count(function) = 1"><value-of select="@gml:id | @id"/>: SE_MISSING_ELEMENT function</assert>
        </rule>
        <rule context="//BuildingPart | //bldg:BuildingPart">
            <assert test="@gml:id | @id"><value-of select="@gml:id | @id"/>: Attribute gml:id is missing in one building part.</assert>
            <assert test="count(lod1Solid) = 1"><value-of select="@gml:id | @id"/>: SE_MISSING_ELEMENT lod1Solid</assert>
        </rule>
    </pattern>
</schema>