为什么xml:lang而不是lang? [英] Why xml:lang instead of lang?
问题描述
引入新属性xml:lang
而不是lang的原因是什么?这困扰了作者和浏览器
的不同语言版本:HTML 4,XHTML 1.0,XHTML 1.1。
HTML只有lang; XHTML 1.1只有xml:lang;
XHTML 1.0都有!
例如,Mozilla 1.7识别lang属性
< a rel =nofollowhref =http://www.unics.uni-hannover.de/nhtcapri/temp/lang-attribute.htmtarget =_ blank> http://www.unics.uni-hannover .de / nht ...- attribute.htm
但它无法识别xml:lang属性。
http://www.unics.uni-hannover.de/nht...ttribute.xhtml
我们从xml:lang中获得了什么?
< blockquote>
Andreas Prilop写道:
引入新属性xml:lang
的原因是什么? lang?
我们从xml:lang中获得了什么?
将属性放在通用和预定义的命名空间中
http://www.w3.org/XML/1998/namespace 它可以是由任何XML
应用程序(例如XHTML,SVG)使用而无需任何进一步的努力且没有任何
在没有命名空间的情况下与特定XML的属性发生冲突的危险
应用程序可能想要定义。
-
Martin Honnen
http://JavaScript.FAQTs.com/
Andreas Prilop写道:引入新属性xml:lang
而不是lang的原因是什么?
因为在XML核心中描述语言是有用的。
我从(X)以HTML为中心的观点来看,这看起来很愚蠢。
-
David Dorward
http://dorward.me.uk/
< blockquote>在文章< Pi ************************************* @ s5b004.rr zn。 uni-hannover.de>,
Andreas Prilop< nh ****** @ rrzn-user.uni-hannover.de>写道:
引入新属性xml:lang
而不是lang的原因是什么?这困扰了作者和浏览器在不同的语言版本中:HTML 4,XHTML 1.0,XHTML 1.1。
HTML只有lang; XHTML 1.1只有xml:lang;
XHTML 1.0都有!
XML总是有xml:lang,XHTML得到它因为它'的XML。
- Richard
What was the reason to introduce a new attribute "xml:lang"
instead of "lang"? This bothers both authors and browsers
in different language versions: HTML 4, XHTML 1.0, XHTML 1.1.
HTML has only "lang"; XHTML 1.1 has only "xml:lang";
XHTML 1.0 has both!
For example, Mozilla 1.7 recognizes the lang attribute
http://www.unics.uni-hannover.de/nht...-attribute.htm
but it does not recognize the xml:lang attribute.
http://www.unics.uni-hannover.de/nht...ttribute.xhtml
What do we gain from "xml:lang"?
Andreas Prilop wrote:
What was the reason to introduce a new attribute "xml:lang"
instead of "lang"? What do we gain from "xml:lang"?
By putting the attribute in the general and predefined namespace
http://www.w3.org/XML/1998/namespace it can be used by any XML
application (e.g. XHTML, SVG) without any further effort and without any
danger of colliding with attributes in no namespace a particular XML
application might want to define.
--
Martin Honnen
http://JavaScript.FAQTs.com/
Andreas Prilop wrote:What was the reason to introduce a new attribute "xml:lang"
instead of "lang"?
Since it is useful to have a means of describing language in the core
of XML.
It only looks silly from an (X)HTML-centric viewpoint.
--
David Dorward
http://dorward.me.uk/
In article <Pi*************************************@s5b004.rr zn.uni-hannover.de>,
Andreas Prilop <nh******@rrzn-user.uni-hannover.de> wrote:
What was the reason to introduce a new attribute "xml:lang"
instead of "lang"? This bothers both authors and browsers
in different language versions: HTML 4, XHTML 1.0, XHTML 1.1.
HTML has only "lang"; XHTML 1.1 has only "xml:lang";
XHTML 1.0 has both!
XML has always had xml:lang, XHTML gets it because it''s XML.
-- Richard
这篇关于为什么xml:lang而不是lang?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!