简体   繁体   English

元素类型“xsd:sequence”必须由匹配的结束标签“”终止

[英]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.

相关问题 元素类型“xsd:schema”必须由匹配的结束标签“”终止 - The element type “xsd:schema” must be terminated by the matching end-tag “</xsd:schema>” 元素类型“标签”必须以匹配的结束标签“</tag> ” - The element type "tag" must be terminated by the matching end-tag "</tag>" XSD元素类型不会以匹配的结束标签终止 - XSD element type won't terminate with matching end-tag 元素类型“META”必须以匹配的结束标签“</META> ” - The element type “META” must be terminated by the matching end-tag “</META>” 元素类型 X 必须由匹配的结束标记终止 - The element type X must be terminated by the matching end-tag SaxParseException 元素类型“hr”必须由匹配的结束标记“终止</hr> “。在使用 jaxb 读取 xml 时 - SaxParseException The element type "hr" must be terminated by the matching end-tag "</hr>". while reading xml with jaxb “img”必须由匹配的end-tag终止 - “img” must be terminated by the matching end-tag 如何解决这个错误“元素类型”头“必须由匹配的结束标记”</ head>“终止>? - How to solve this error “The element type ”head“ must be terminated > by the matching end-tag ”</head>"? TypeError:错误#1085:元素类型“ opi1”必须以匹配的结束标记“ </opi1> ” - TypeError: Error #1085: The element type “opi1” must be terminated by the matching end-tag “</opi1>” hive-site.xml:元素类型“configuration”必须由匹配的end-tag终止“ </configuration> ” - hive-site.xml: The element type “configuration” must be terminated by the matching end-tag “</configuration>”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM