[英]The element type “xsd:sequence” must be terminated by the matching end-tag “</xsd:sequence>”
<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="City">
<xsd:complexType>
<xsd:sequence>
<!--BUILDING ELEMENT //1 - Skyscraper-->
<xsd:element name="Skyscraper">
<!--A city can have a total of 50 skyscrapers-->
<xsd:complexType>
<xsd:sequence>
<xsd:element name="PrimaryMaterial"/>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="concrete"/>
<xsd:enumeration value="steel"/>
<xsd:enumeration value="aluminium"/>
<xsd:enumeration value="glass"/>
<xsd:enumeration value="wood"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<!--SKYSCRAPER ELEMENT //1 - Height-->
<xsd:element name="Height" type="xsd:integer"/>
<!--SKYSCRAPER ELEMENT //2 - ConstructionStarted-->
<xsd:element name="ConstructionStarted" type="xsd:integer"/>
<!--SKYSCRAPER ELEMENT //3 ConstructionStopped-->
<xsd:element name="ConstructionStopped" type="xsd:integer"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Very confused - seems as though I did everything right?非常困惑 - 好像我做的一切都是正确的?
ERROR:错误:
The element type:元素类型:
"xsd:sequence" must be terminated by the matching end-tag "". “xsd:sequence”必须以匹配的结束标签“”结束。
Help would be much appreciated, it's quite hard to manage.非常感谢您的帮助,这很难管理。
I get a different error我得到一个不同的错误
Failed to load schema.未能加载架构。
Reason: The ' http://www.w3.org/2001/XMLSchema:simpleType ' element is not supported in this context.原因:此上下文不支持“ http://www.w3.org/2001/XMLSchema:simpleType ”元素。
The issue is this line, where you have trailing / which should not be there, as it is ended below your restriction etc. with the </xsd:element>
问题是这一行,你有尾随 / 不应该在那里,因为它以</xsd:element>
结束于你的限制等之下
<xsd:element name="PrimaryMaterial"/>
This should be这应该是
<xsd:element name="PrimaryMaterial">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.