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/nhtcapri/temp/lang-attribute.htm but it does not recognize the xml:lang attribute. http://www.unics.uni-hannover.de/nhtcapri/temp/lang-attribute.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 <Pine.GSO.4.44.0603311415390.8640-100000@s5b004.rrzn.uni-hannover.de>, Andreas Prilop <nhtcapri@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
Andreas Prilop 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! > > For example, Mozilla 1.7 recognizes the lang attribute > http://www.unics.uni-hannover.de/nhtcapri/temp/lang-attribute.htm > but it does not recognize the xml:lang attribute. > http://www.unics.uni-hannover.de/nhtcapri/temp/lang-attribute.xhtml > > What do we gain from "xml:lang"? xml:lang is not a 'new' attribute. It's part of the XML1.0 specification which predates XHTML. XHTML1.0 tries to be compatible with HTML4.01 and supports the lang attributes and you should use both, if you want to be compatiable with tag-soup parsers. But by being XML it also inherited xml:lang. Using xml:lang has the advantage that this is (or could be) recognized by any XML processing tool that needs this information (e.g. spellcheckers) but does not have knowledge of the XHTML semantics (so it does not understand 'lang'). -- Benjamin Niemann Email: pink at odahoda dot de WWW: http://pink.odahoda.de/
Andreas Prilop 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! > > For example, Mozilla 1.7 recognizes the lang attribute > http://www.unics.uni-hannover.de/nhtcapri/temp/lang-attribute.htm > but it does not recognize the xml:lang attribute. > http://www.unics.uni-hannover.de/nhtcapri/temp/lang-attribute.xhtml I can reproduce this with FF1.5 - I'd say, it's time for a bugreport ;) -- Benjamin Niemann Email: pink at odahoda dot de WWW: http://pink.odahoda.de/
On Fri, 31 Mar 2006, Benjamin Niemann wrote: >> For example, Mozilla 1.7 recognizes the lang attribute >> http://www.unics.uni-hannover.de/nhtcapri/temp/lang-attribute.htm >> but it does not recognize the xml:lang attribute. >> http://www.unics.uni-hannover.de/nhtcapri/temp/lang-attribute.xhtml > > I can reproduce this with FF1.5 - I'd say, it's time for a bugreport ;) Bug #234485 at http://bugzilla.mozilla.org/
Andreas Prilop wrote: > What was the reason to introduce a new attribute "xml:lang" You've had lots of answers in comp.text.xml Please do NOT multipost. -- David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/> Home is where the ~/.bashrc is
David Dorward wrote: > You've had lots of answers in comp.text.xml This is comp.text.xml > Please do NOT multipost. AFAICS it was a crosspost, not a multipost. -- Johannes Koch Spem in alium nunquam habui praeter in te, Deus Israel. (Thomas Tallis, 40-part motet)
Johannes Koch wrote: > AFAICS it was a crosspost, not a multipost. err... whoops, so it was. -- David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/> Home is where the ~/.bashrc is
"David Dorward" <dorward@gmail.com> wrote: > Since it is useful to have a means of describing language in the core > of XML. But why would that be particularly useful as compared with other features that could have been included into the "core"? Why don't we have xml:dir (for text directionality), too, for example? -- Yucca, http://www.cs.tut.fi/~jkorpela/
In article <Xns9797F2CF91FBFjkorpelacstutfi@193.229.4.246>, Jukka K. Korpela <jkorpela@cs.tut.fi> wrote: >But why would that be particularly useful as compared with other features >that could have been included into the "core"? Why don't we have >xml:dir (for text directionality), too, for example? That would be rather different: xml:lang describes the content itself, not how it should be presented. But I'm not sure why xml:lang was deemed important enough to include. -- Richard
Andreas Prilop 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! XHTML 1.0 could be read as invalid HTML markup if sent with the text/html content-type, maybe this is why there are these to differents lang attributes ? One for SGML based markup, one for XML based markup. The compatibility guidelines of the XHTML 1.0 recommandation tells something that make me think this : http://www.w3.org/TR/xhtml1/#C_7