问题
下面的schema:
<Schema xmlns="urn:schemas-microsoft-com:xml-data"
xmlns:dt="urn:schemas-microsoft-com:datatypes">
<AttributeType name='studentID' dt:type='string' required='yes'/>
<ElementType name='name' content='textOnly'/>
<ElementType name='GPA' content='textOnly' dt:type='float'/>
<ElementType name='student' content='mixed'>
<attribute type='studentID'/>
<element type='name'/>
<element type='GPA'/>
</ElementType>
<ElementType name='class' content='eltOnly'>
<element type='student'/>
</ElementType>
</Schema>
我保存在c:\ttt,文件名:classSchema.xml
另外建立一个xml文档保存在c:\ttt
<class xmlns="x-schema:classSchema.xml">
<student studentID="13429">
<name>James Smith</name>
<GPA>3.8</GPA>
</student>
</class>
用IE5.0打开上面的xml文档
我将GPA里面的3.8改为hkj等字符串,我觉得schema应该起作用,因为GPA必须是float类型数据,可是改成字符串用IE5浏览为什么不报错误?