我正在尝试编写 XSD 文档
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:books" xmlns:bks="urn:books">
<xsd:element name="Books" type="bks:BooksForm"/>
<xsd:complexType name="BooksForm">
<xsd:sequence>
<xsd:element name="Book" type="bks:BookForm" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="BookForm">
<xsd:sequence>
<xsd:element name="Author" type="bks:AuthorForm" minOccurs="1" /><!--1-->
<xsd:element name="Isbn" type="xsd:string" minOccurs="1" />
<xsd:element name="Title" type="xsd:string" minOccurs="1" />
<xsd:element name="Publisher" type="xsd:string" minOccurs="1" />
<xsd:element name="YearValue" type="bks:YearForm" minOccurs="1" /><!--2-->
</xsd:sequence>
<xsd:attribute name="Cover" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name="AuthorForm">
<xsd:sequence>
<xsd:element name="Name" type="bks:NameForm"/><!--1-->
<xsd:element name="Contact" type="bks:ContactForm"/> <!--2-->
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="YearForm">
<xsd:sequence>
<xsd:element name="Year" type="xsd:integer"/><!--1-->
</xsd:sequence>
<xsd:attribute name="Edition" type="xsd:integer"/>
</xsd:complexType>
<xsd:complexType name="NameForm">
<xsd:sequence>
<xsd:element name="First" type="xsd:string"/><!--1-->
<xsd:element name="Last" type="xsd:string"/> <!--2-->
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ContactForm">
<xsd:sequence>
<xsd:element name="Phone" type="xsd:string"/><!--1-->
</xsd:sequence>
<xsd:attribute name="Office" type="xsd:string"/>
</xsd:complexType>
</xsd:schema>
与以下 XML 文档匹配的
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="Courses.xsl"?>
<Books>
<Book Cover="Paper back">
<Isbn>978-1-4652-0558-2</Isbn>
<Title>Service-Oriented Computing</Title>
<Author>
<Name>
<First>John</First>
<Last>Doe</Last>
</Name>
<Contact Office="BY400">
<Phone>480-965 000</Phone>
</Contact>
</Author>
<Publisher>Kendall Hunt</Publisher>
<Year Edition="3">
<Year>2012</Year>
</Year>
</Book>
....</Books>
但是,当我尝试在线验证时出现以下错误
Line 3, 8 cvc-elt.1.a: Cannot find the declaration of element 'Books'.
但据我所知,我已经正确地声明了它。谁能指出我在这里做错了什么?谢谢