报错Cannot find the declaration of element
来源:2-7 自由编程
秒杀1
2018-12-15 10:23:20
<?xml version="1.0" encoding="UTF-8"?>
<!-- <!DOCTYPE teaching-plan SYSTEM "xml1.10.dtd"> -->
<teaching-plan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="xml1.10.xsd">
<course no="1">
<course-name>大学英语</course-name>
<class-hour>76</class-hour>
<exam-form>考试</exam-form>
</course>
<course no="2">
<course-name>高等数学</course-name>
<class-hour>70</class-hour>
<exam-form>考试</exam-form>
</course>
<course no="3">
<course-name>计算机网络</course-name>
<class-hour>80</class-hour>
<exam-form>上机考试</exam-form>
</course>
</teaching-plan>
=================================================
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/xml1.10" xmlns:tns="http://www.example.org/xml1.10" elementFormDefault="qualified">
<element name="teaching-plan">
<complexType>
<sequence>
<element name="course" minOccurs="1" maxOccurs="100">
<complexType>
<sequence>
<element name="course-name" type="string"></element>
<element name="class-hour">
<simpleType>
<restriction base="integer">
<minInclusive value="20"></minInclusive>
<maxInclusive value="110"></maxInclusive>
</restriction>
</simpleType>
</element>
<element name="exam-form" type="string"></element>
</sequence>
<attribute name="no" type="integer" use="required"></attribute>
</complexType>
</element>
</sequence>
</complexType>
</element>
</schema>
第三四行报错,引入的xsd文件有错误,这是怎么回事?
1回答
好帮手慕阿莹
2018-12-16
相似问题