<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[gOxiA=苏繁=SuFan Blog]]></title> 
<link>https://sufan.maytide.net/index.php</link> 
<description><![CDATA[gOxiA,苏繁,sufan,Microsoft MVP]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[gOxiA=苏繁=SuFan Blog]]></copyright>
<item>
<link>https://sufan.maytide.net/read.php/819.htm</link>
<title><![CDATA[DOCTYPE声明完毕后的名字空间定义]]></title> 
<author>gOxiA &lt;sufan_cn@msn.com&gt;</author>
<category><![CDATA[网络编程]]></category>
<pubDate>Fri, 02 Dec 2005 08:40:00 +0000</pubDate> 
<guid>https://sufan.maytide.net/read.php/819.htm</guid> 
<description>
<![CDATA[ 
	<p>DOCTYPE声明好以后，接下来的代码是：</p><span class="code"><div class="code">&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; lang=&quot;gb2312&quot;&gt;</span> </div><p>通常HTML4.0的代码只是<span class="code">&lt;html&gt;</span>，这里的&quot;xmlns&quot;是什么呢？</p><p>这个&quot;xmlns&quot;是XHTML namespace的缩写，叫做&quot;名字空间&quot;声明。名字空间是什么作用呢？阿捷自己的理解是：</p><p>由于xml允许你自己定义自己的标识，你定义的标识和其他人定义的标识有可能相同，但表示不同的意义。当文件交换或者共享的时候就容易产生错误。为了避免这种错误发生，XML采用名字空间声明，允许你通过一个网址指向来识别你的标识。</p><p>XHTML是HTML向XML过渡的标识语言，它需要符合XML文档规则，因此也需要定义名字空间。又因为XHTML1.0不能自定义标识，所以它的名字空间都相同，就是<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>。</p><p>后面的lang=&quot;gb2312&quot;,指定你的文档用简体中文。</p>
]]>
</description>
</item>
</channel>
</rss>