After trying a lot of things to get an error in IntelliJ over a unique constraint I'm starting to wonder if IntelliJ is even recognizing it.
The last schema I gave a try came from this post Unique constraint in XML Schema
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.brabantia.com/XMLSchema/ESBConfig"
xmlns:tns="http://www.brabantia.com/XMLSchema/ESBConfig"
elementFormDefault="qualified">
<element name="authors">
<complexType>
<sequence>
<element name="author" maxOccurs="unbounded" type="string"/>
</sequence>
</complexType>
<unique name="uniqueAuthor">
<selector xpath="author"/>
<field xpath="."/>
</unique>
</element>
</schema>
Which I used to generate the XML by IntelliJ.
<?xml version="1.0" encoding="UTF-8"?>
<esb:authors xmlns:esb="http://www.brabantia.com/XMLSchema/ESBConfig">
<!--1 or more repetitions:-->
<esb:author>string</esb:author>
<esb:author>string</esb:author>
<esb:author>string</esb:author>
</esb:authors>
Which should show an error, but it doesn't.
In the Generate Instance Document From Schema
wizard I have checked Enable restriction check
and Enable unique check
.
All other checks work, like enumeration and pattern.
Could someone tell me if this is something in the schema or something that is simply not supported in IntellJ?