is used, the base type must be a complexType whose content type is simple..."到底是什么意思?-6ren"> is used, the base type must be a complexType whose content type is simple..."到底是什么意思?-这是我不断从 xerces 得到的整个错误.... When is used, the base type must be a complexType whose content type is s-6ren">
gpt4 book ai didi

xml - "When is used, the base type must be a complexType whose content type is simple..."到底是什么意思?

转载 作者:数据小太阳 更新时间:2023-10-29 02:32:35 28 4
gpt4 key购买 nike

这是我不断从 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 contentand emptiable particle, or, only if extension is specified, a simple type.'string' satisfies none of these conditions.

I thought I understood this, but after getting it several times I must have lost it, anyone have a good "spin" on it

I've narrowed it down to this element

<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 Schema: Content Types , 第二个代码片段。

我正在假设 Note 元素可以是什么。如果以上内容与您要实现的目标不符,请说明您是否希望 Note 元素能够具有属性和/或文本内容和/或子元素。

关于xml - "When <simpleContent> is used, the base type must be a complexType whose content type is simple..."到底是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3505923/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com