对 2 个元素中存在的相同属性施加差异限制

Putting diff restriction on same attribute present in 2 elements

我有一个 xml 如下:

<Setting>
    <Error Num="1" Level="2"/>
    <Warning Num="3" Level="3"/>
</Setting>

现在,对于相应的 XSD,我想对 "Level" 进行限制,即 "Error" 中的 "Level" 的值应介于 1 到 10 和 "Level" 之间"Warning" 的值应该在 5 到 15 之间。我怎样才能在 XSD 中做到这一点?

<?xml version="1.0" encoding="utf-8" ?>
<!--Created with Liquid Studio 2019 BETA (https://www.liquid-technologies.com)-->
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Setting">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="Error">
                    <xs:complexType>
                        <xs:attribute name="Num" type="xs:int" />
                        <xs:attribute name="Level">
                            <xs:simpleType>
                                <xs:restriction base="xs:int">
                                    <xs:minInclusive value="1" />
                                    <xs:maxInclusive value="10" />
                                </xs:restriction>
                            </xs:simpleType>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>
                <xs:element name="Warning">
                    <xs:complexType>
                        <xs:attribute name="Num" type="xs:int" />
                        <xs:attribute name="Level">
                            <xs:simpleType>
                                <xs:restriction base="xs:int">
                                    <xs:minInclusive value="5" />
                                    <xs:maxInclusive value="15" />
                                </xs:restriction>
                            </xs:simpleType>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>