[xsde-users] Adding unique constraint to an xsd

Jonathan Ball Jonathan.Ball at domino-uk.com
Tue Oct 18 06:22:12 EDT 2016


Hi,

We have added a constraint such that the ID of polymorphic elements is unique across all instances of those elements.  When encountering duplicated IDs, XSD/e does not raise an error - is this supported on XSD/e?

Code snippet:
    <xs:element name="root" type="FOO:Root">
       ...
        <xs:unique name="uniqueContentIdentifier">
            <xs:selector xpath=".//FOO:Type1 | .//FOO:Type2 | .//FOO:Type3" />
            <xs:field xpath="@id"/>
        </xs:unique>
        ...
    </xs:element>

Kind Regards,
Jon

This Email and any files transmitted with it are intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any reading, redistribution, disclosure or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient please contact the sender immediately and delete the material from your computer. E-mail may be susceptible to data corruption, interception, viruses and unauthorised amendment and Domino UK Limited<http://www.domino-printing.com/Channels/UK/eng/Home.aspx> does not accept liability for any such corruption, interception, viruses or amendment or their consequences.


Domino UK Limited<http://www.domino-printing.com/Channels/UK/eng/Home.aspx> Registered in England. Registered Number:1750201. Registered Office Address: Trafalgar Way, Bar Hill, Cambridge, CB23 8TU.


More information about the xsde-users mailing list