XSD架构-无法在简单类型中添加批注
对于simpleType,我对模式和注释有问题 我的模式:XSD架构-无法在简单类型中添加批注,xsd,schema,Xsd,Schema,对于simpleType,我对模式和注释有问题 我的模式: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> /...CODE.../ <xsd:simpleType name="DateTimeType"> <xsd:restriction base="xsd:dateTime"/> <xsd:annotation> <!--Line: 161 --&
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
/...CODE.../
<xsd:simpleType name="DateTimeType">
<xsd:restriction base="xsd:dateTime"/>
<xsd:annotation> <!--Line: 161 -->
<xsd:documentation>
Date time
</xsd:documentation>
</xsd:annotation>
</xsd:simpleType>
</xsd:schema>
我怎样才能修好它
好的,我把它修好了。重要的是:简单类型中元素的顺序。好的顺序是注释,然后是e.q.限制或并集
<xsd:simpleType name="DateTimeType">
<xsd:annotation>
<xsd:documentation>
Date time
</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:dateTime"/>
</xsd:simpleType>
日期时间
<xsd:simpleType name="DateTimeType">
<xsd:annotation>
<xsd:documentation>
Date time
</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:dateTime"/>
</xsd:simpleType>