xml schema namespace相关
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 的位置: (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |