I working with XML/XSD files, but i have one problem with the validation.
One field has this restriction:
<xs:pattern value="[A-Za-z0-9 '\-\./]+"/>
But when I put this value:
example with àccented character
The validator says that "The Pattern constraint failed"
So basically, what I'm asking is: Are accented characters included in the a-z pattern?
If not, what can I do? (Consider that I'm not able to change the .xsd because it's not mine and I'm not allowed.)
No, accented characters are not included in the
[A-Za-z]
pattern.If you could change the XSD, and if you want a much more general Unicode-based pattern, you could specify:
Explanation:
[...]+
matches one or more of its containing characters.If you cannot change the XSD, and if you wish for your document to be valid by it, you should abide by its constraints. There could be reasons other than neglect that the XSD precludes non-ASCII code points. For example, consuming applications may expect or even require ASCII there.