潜谈 XHTML1.0 的标准定义(二)
三 23, 2010 | wordpress 建站攻略 |
在XHTML命名空间可以以XMLNS的方式与其它XML命名空间一起使用,虽然这样的文件并非严谨依循之前XHTML1.0的定义。W3C目前也正在为多重命名空间一致性的问题进行研究。
下面的例子说明XHTML1.0和MathML建议规范联合使用的方法。
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>A Math Example</title>
</head>
<body>
<p>The following is MathML markup:</p>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply> <log/>
<logbase>
<cn> 3 </cn>
</logbase>
<ci> x </ci>
</apply>
</math>
</body>
</html>
下面的例子说明XHTML1.0和其它XML命名空间联合使用的方法:
12
<?xml version="1.0" encoding="UTF-8"?>
<!– initially,the default namespace is "books" –>
<book xmlns='urn:loc.gov:books'
xmlns:isbn='urn:ISBN:0-395-36341-6' xml:lang="en" lang="en">
<title>Cheaper by the Dozen</title>
<isbn:number>1568491379</isbn:number>
<notes>
<!– make HTML the default namespace for a hypertext commentary –>
<p xmlns='http://www.w3.org/1999/xhtml'>
This is also available <a href="http://www.w3.org/">online</a>.
</p>
</notes>
</book>





留下您的脚印