【问题标题】:xsd: restricting an attribute to be greater than an other (relative validation) [duplicate]xsd:限制一个属性大于另一个(相对验证)[重复]
【发布时间】:2016-06-07 06:57:58
【问题描述】:

我正在寻找一种方法来根据伴随属性valid-from 限制属性valid-till 的输入。

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> 
   <xs:complexType name="Data">
      <xs:sequence>
        <xs:element name="material" type="Material" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:attribute name="id" type="xs:ID" />
      <xs:attribute name="valid-from" type="xs:dateTime" />
      <xs:attribute name="valid-till" type="xs:dateTime" />
   </xs:complexType>
</xs:schema>

我怎样才能实现这个目标?

【问题讨论】:

  • 确实如此。由于我仅限于 xsd-1.0,因此没有解决方案。正如你mentioned.

标签: xml xsd


【解决方案1】:
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-06-01
  • 2012-07-15
  • 2019-06-13
  • 2014-09-25
  • 2016-03-22
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多