IDREF constraint

Hi,
does anyone know if there is a way of constraining the value if an IDREF
attribute in order allows as values only IDS of specified elements ? For
example:
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="e1">
        <xsd:complexType>
            <xsd:attribute name="id" type="xsd:ID"/>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name="e1">
        <xsd:complexType>
            <xsd:attribute name="id" type="xsd:ID"/>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name="e1">
        <xsd:complexType>
            <xsd:attribute name="id" type="xsd:ID"/>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name="choice1">
        <xsd:complexType>
            <xsd:sequence>
                I WANT THIS TO BE ABLE TO POINT ONLY TO IDS IG <e1> OR
<e2> ELEMENTS
                <xsd:element name="target" type="xsd:IDREF"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name="choice12">
        <xsd:complexType>
            <xsd:sequence>
                I WANT THIS TO BE ABLE TO POINT ONLY TO IDS OF <e3> ELEMENTS
                <xsd:element name="target" type="xsd:IDREF"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
</xsd:schema>

Received on Tuesday, 17 December 2002 10:09:34 UTC