I have a regex pattern in my XSD that does the trick but the readability is poor.
<xs:element name="short_description">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="|^([a-zA-Z0-9áÁâÂàÀäÄåÅöÖòÒóÓôÔøØüÜûÛùÙúÚßíÍïÏîÎìÌñÑÇç.,?()!\/çéÉêÊèÈëË +;&'':"\n\t%#£°€@=«»¦*`´-]){1,}$"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
Therefore I tried to seperate it as the following for a better readability (example)
<xs:element name="title">
<xs:simpleType>
<xs:restriction base="xs:string">
<!-- Check the title with no limitation to size -->
<xs:pattern value="|^([a-zA-Z0-9áÁâÂàÀäÄåÅöÖòÒóÓôÔøØüÜûÛùÙúÚßíÍïÏîÎìÌñÑÇçéÉêÊèÈëË]){1,}$"/>
<xs:pattern value="|^([.,?()!\/ +;':`´-]){1,}$"/>
<xs:pattern value="|^([&$apos;"]){1,}$"/>
<xs:pattern value="|^([\n\t]){1,}$"/>
<xs:pattern value="|^([%#£°€@=«»¦*]){1,}$"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
After rerunning my XSD it seems that he is only looking at the first line when the patterns are separated.
Is there a way to make the first pattern (see above) more readable? Or am I doing something wrong in the second example?