schema报错
相关代码:
<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE teaching-plan SYSTEM "plan.dtd"> <!--教学计划--> <teaching-plan xmlns="http://www.imooc.com/plan-schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imooc.com/plan-schema plan.xsd"> <course id="3309"> <course-name>大学英语</course-name> <class-hour>36</class-hour> <exam-form>考试</exam-form> </course> <course id="3310"> <course-name>高等数学</course-name> <class-hour>70</class-hour> <exam-form>考试</exam-form> </course> <course id="3311"> <course-name>计算机应用基础</course-name> <class-hour>108</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.imooc.com/plan-schema" 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="id" type="string" use="required"></attribute> </complexType> </element> </sequence> </complexType> </element> </schema>
问题描述:
id,exam-form字段下面红线报错
相关截图:
17
收起
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星