gpt4 book ai didi

XSD 错误 : attribute 'substitutiongroup' cannot appear in element 'element'

转载 作者:行者123 更新时间:2023-12-05 07:58:05 26 4
gpt4 key购买 nike

获取属性“substitutiongroup”不能出现在元素“element”中错误:

  <xs:complexType name="Attributes" abstract="false">
<xs:sequence>
<xs:element name="Attribute" nillable="true" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="type" type="xs:string" />
</xs:element>
<xs:element name="DutyRating" substitutionGroup="Attribute"/>
<xs:element name="Width" substitutionGroup="Attribute"/>
<xs:element name="SampleSet" substitutionGroup="Attribute"/>
</xs:sequence>
</xs:complexType>

我做错了什么?

最佳答案

你应该使用这个 xsd...

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="yourNamespace" xmlns:prefix="yourNamespace">

<xs:complexType name="Attributes" abstract="false">
<xs:sequence>
<xs:element name="Attribute" substitutionGroup="prefix:Attribute"/>
<xs:element name="DutyRating" substitutionGroup="prefix:Attribute"/>
<xs:element name="Width" substitutionGroup="prefix:Attribute"/>
<xs:element name="SampleSet" substitutionGroup="prefix:Attribute"/>
</xs:sequence>
</xs:complexType>

<xs:element name="Attribute" type="prefix:Attribute"/>
<xs:complexType name="Attribute" nillable="true" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="type" type="xs:string" />
</xs:complexType>

</xs:schema>

我希望我已经给了你关于你问题的所有答案。

关于XSD 错误 : attribute 'substitutiongroup' cannot appear in element 'element' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25455295/

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