Quite new at XSD validations. Is there any way at all to validate string values - to allow all values a user may enter except certain values that contain a keyword.
For example, I have a system that users can submit their names. I want to allow any name that comes through except for strings that contain 'Joh'
i.e. Allow Mary, Eric, Simon, etc and reject John, Johan, Bjohn, Benjoh, etc
So in my understanding (coming from PHP), 'Not Equal To' is '!=' but this wouldn't work here. And wildcards wouldn't work as for any values that contain 'joh' as '%joh%'
<xs:element name="Names">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value!="%joh%"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
Is there anyway around this?