Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 XSD 中,有两个元素 A 和 B。它们是同级元素。
A 的值可以是“1”或“2”。B 的值可以是“一”或“二”。
但是,我想限制这一点,以便只有“1-one”和“2-two”是有效的组合,而不是“1-two”或“2-one”。有没有办法在 XSD 中做到这一点?
Schematron 可用于定义此类共现约束。您可以在此处找到一些介绍性文章: