XSD - 多种类型的内容验证

时间:2011-12-09 14:21:58

标签: xml validation xsd

我想验证结构的xml文件:

<element>255</element> <!-- Integers are allowed from 0 to 255 -->
<element>Impossible</element> <!-- "Impossible" should be the only valid string -->

这对xsd来说甚至可能吗? (不使用整数的字符串模式匹配)

祝你好运

Hemeroc

1 个答案:

答案 0 :(得分:1)

您需要一个 union 整数和限制字符串类型。例如Look at this article

相关问题