加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

xml schema namespace相关

发布时间:2020-12-16 09:37:46 所属栏目:百科 来源:网络整理
导读:W3schoolhttp://www.w3school.com.cn/schema/schema_schema.asp namesapace啊,我心中永远的痛。 1、xmlns:xs="http://www.w3.org/2001/XMLSchema" 显示 schema 中用到的元素和数据类型来自命名空间 "http://www.w3.org/2001/XMLSchema"。同时它还规定了来自

W3schoolhttp://www.w3school.com.cn/schema/schema_schema.asp

namesapace啊,我心中永远的痛。

1、xmlns:xs="http://www.w3.org/2001/XMLSchema"

显示 schema 中用到的元素和数据类型来自命名空间 "http://www.w3.org/2001/XMLSchema"。同时它还规定了来自命名空间 "http://www.w3.org/2001/XMLSchema" 的元素和数据类型应该使用前缀 xs:

2、targetNamespace="http://www.w3school.com.cn"

显示被此 schema 定义的元素 (note,to,from,heading,body) 来自命名空间:"http://www.w3school.com.cn"。

3、xmlns="http://www.w3school.com.cn"

指出默认的命名空间是 "http://www.w3school.com.cn"。

4、elementFormDefault="qualified"

指出任何 XML 实例文档所使用的且在此 schema 中声明过的元素必须被命名空间限定。

5、xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

可用的 XML Schema 实例命名空间

6、xsi:schemaLocation="http://www.w3school.com.cn note.xsd"

第一个值是需要使用的命名空间。第二个值是供命名空间使用的 XML schema 的位置:

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读