<?xml version="1.0"?>
<xs:schema xmlns:xs="
http://www.w3.org/2001/XMLSchema"
targetNamespace="
http://www.w3schools.com"
xmlns="
http://www.w3schools.com"
elementFormDefault="qualified">
<xs:element name="note">
<xs:complexType>
<xs:sequence>
<xs:element name="to" type="xs:string"/>
<xs:element name="from" type="xs:string"/>
<xs:element name="heading" type="xs:string"/>
<xs:element name="body" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
schema规范中
3:
namespace的值由什么来指定?
由targetNamespace来指定,这里它是一个URL(很可能不存在)
4:
如何引入一个schema约束?
6:
schema文件位置由谁来指定呢?
属性:schemaLocation指定
属性值:namespace path
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。