xmlns与xsi:schemaLocation含义

xmlns 说明参见 http://www.cnblogs.com/jhxk/articles/1619105.html

xsi:schemaLocation说明参见http://www.w3school.com.cn/schema/schema_example.asp

 

xsi:schemaLocation中的模式文档.xsd文件一般都在本地,比如spring

<beans default-autowire="byName"

xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:aop="http://www.springframework.org/schema/aop" xmlns:util="http://www.springframework.org/schema/util"

xsi:schemaLocation="http://www.springframework.org/schema/beans 

http://www.springframework.org/schema/beans/spring-beans-2.0.xsd 

http://www.springframework.org/schema/aop 

http://www.springframework.org/schema/aop/spring-aop-2.0.xsd 

http://www.springframework.org/schema/util 

http://www.springframework.org/schema/util/spring-util-2.5.xsd ">

中的.xsd文件都在spring包内,如下图:


xmlns与xsi:schemaLocation含义_第1张图片
 spring.schemas中定义了文档的具体地址:


xmlns与xsi:schemaLocation含义_第2张图片

你可能感兴趣的:(location)