はい; 必要な XML スキーマ コンポーネントは key/keyref です。
<?xml version="1.0" encoding="utf-8"?>
<!--XML Schema generated by QTAssistant/XML Schema Refactoring (XSR) Module (http://www.paschidev.com)-->
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="sample">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Images">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="Image">
<xsd:complexType>
<xsd:attribute name="ImageId" type="xsd:unsignedByte" use="required"/>
<xsd:attribute name="ImageFile" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Banners">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="Banner">
<xsd:complexType>
<xsd:attribute name="BannerId" type="xsd:unsignedShort" use="required"/>
<xsd:attribute name="ImageId" type="xsd:unsignedByte" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:key name="PK">
<xsd:selector xpath="Images/Image"/>
<xsd:field xpath="@ImageId"/>
</xsd:key>
<xsd:keyref name="FK" refer="PK">
<xsd:selector xpath="Banners/Banner"/>
<xsd:field xpath="@ImageId"/>
</xsd:keyref>
</xsd:element>
</xsd:schema>
サンプル エラー メッセージ:
The key sequence '8' in Keyref fails to refer to some key.
xsd-restriction-by-value.xml is XSD 1.0 invalid.