0
我已经去通篇关于DTD和XSD他们基本上定义结构与法律元素和属性的列表,以便尽可能春天而言它是好的我们必须遵循一些指导方针,以便每个人都必须遵守。但至于struts如何管理这种依赖关系,因为在MVC的上下文中,spring和struts就像是象征性的一样。在这里,我缺少哪个线程?为什么Spring配置文件必须定义DTD和XSD,但Struts的配置文件不
任何可共享的位是高度赞赏。
编辑: 这是Spring配置文件中的声明
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
,这是对Struts配置文件
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
现在看到在Spring配置文件命名空间 'XSI' 和的schemaLocation为它是由spring定义的,但是对于struts没有这样的配置,只配置由struts定义的struts dtd。
使用DTD或使用XML名称空间是完全不同的事情,因此需要不同的构造。 DTD是旧的,不,他们古老的喜欢XML命名空间。 –