Reputation: 2244
i want to validate an xml file of the Structure:
<element>255</element> <!-- Integers are allowed from 0 to 255 -->
<element>Impossible</element> <!-- "Impossible" should be the only valid string -->
is this even possible with xsd? (Without using the string-pattern-matching for the integers)
Best regards
Hemeroc
Upvotes: 0
Views: 117
Reputation: 80166
You need a union of integer and restricting string types. Look at this article for example.
Upvotes: 1