“当使用时,基本类型必须是一个复杂型的内容类型很简单……”甚至是指?
-
29-09-2019 - |
题
这是我一直从Xerces遇到的整个错误。
When <simpleContent> is used, the base type must be a complexType whose content type is simple, or, only if restriction is specified, a complex type with mixed content and emptiable particle, or, only if extension is specified, a simple type. 'string' satisfies none of these conditions.
我以为我理解了这一点,但是在得到了几次之后,我一定已经丢失了,任何人都有很好的“旋转”
我已经缩小到这个元素
<xs:element name="Note">
<xs:complexType>
<xs:simpleContent>
<xs:restriction base="xs:string">
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
</xs:element>
我想我刚刚曾在这个项目上待着长期出演...
解决方案
看起来你想要
<xs:extension base="xs:string">
代替
<xs:restriction base="xs:string">
例如看 XML模式:内容类型, ,第二代码段。
我对音符元素的假设做出了假设。如果以上内容不符合您要完成的工作,请描述您是否希望注释元素能够具有属性和/或文本内容和/或子元素。
不隶属于 StackOverflow