This type is included in DCC version 3.2 and above.
A string type which doesn't allow entries with blank spaces only and doesn't allow a blank space before and in the end of the value.
<xs:simpleType name="notEmptyStringType">
<xs:restriction base="xs:string">
<xs:pattern value="[^\s]+(\s+[^\s]+)*"/>
</xs:restriction>
</xs:simpleType>
Regex:
[^\s]+(\s+[^\s]+)*
[^\s]+
: Allow a non-whitespace character one or more times.(\s+[^\s]+)*
: Is a group which can be repeated and is optional.
\s+
: Allow a whitespace character one or more times.[^s]+
: Allow a non-whitespace character one or more times.Explanation
Characters which aren't whitespaces are allowed in general. If we got one or more whitespaces then we need a following non-whitespace character and a non-whitespace character before it.