473,666 Members | 2,073 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why xml:lang instead of lang?

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"?

Mar 31 '06 #1
12 1852


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/
Mar 31 '06 #2
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/

Mar 31 '06 #3
In article <Pi************ *************** **********@s5b0 04.rrzn.uni-hannover.de>,
Andreas Prilop <nh******@rrz n-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
Mar 31 '06 #4
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/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"?


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/
Mar 31 '06 #5
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/nht...-attribute.htm
but it does not recognize the xml:lang attribute.
http://www.unics.uni-hannover.de/nht...ttribute.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/
Mar 31 '06 #6
On Fri, 31 Mar 2006, Benjamin Niemann wrote:
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


I can reproduce this with FF1.5 - I'd say, it's time for a bugreport ;)


Bug #234485 at http://bugzilla.mozilla.org/

Mar 31 '06 #7
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
Mar 31 '06 #8
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)
Mar 31 '06 #9
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
Mar 31 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1786
by: lucanos | last post by:
Hi All, I am toying with the idea of making a GreaseMonkey script, or similar (depending on how far out of my comfort zone I am willing to venture), which would translate a page automatically. In order to trigger that script and pass the correct variable to the translator, I am looking for a way to extract certain details from the current page.
0
974
by: Andreas Prilop | last post by:
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....
1
1534
by: Pim75 | last post by:
Hello, I've written a webservice that returns an array. The output of the webservice has to be consumed by a classic asp application. As classic asp can't read the returned array I want the webservice to return a xml document instead of the array. Can anyone tell me how I can output the array as a xml document?
2
1344
by: bhavanirayala | last post by:
Hello All, I have XML::Parser ,installed in my server.I cant install any other modules. So I need to use only XML::Parser. Is it possible to read xml file by tag by tag using XML::Parser? If Yes, please share any code if you have.. Thanks in advance.
2
2100
by: abhimanyu singh | last post by:
i m facing a serious probs now a days............ its seems easy but for me i found it difficult......... i want to do transformation usig xsl and xml(adding parameter). for IE its working fine but for other browser like-firefox,opera its not working......... i m giving u my complete xml,xsl and transformation code....u only paste and check why it is not working for other browser.....and correct it and let me know......this is really a big...
0
1103
by: theintrepidfox | last post by:
Dear Group I wonder if I do something wrong and whether this is possible at all. Any hint is greatly appreciated. I have a XML file bound to a Treeview. The treenodes Text/Value properties bind and populate fine if I set them to an attribute of the XML tag. What I would like to do however is setting my nodes text and value property to text that is between the XML tags. Example:
0
1854
by: Cesar | last post by:
Hello All. There is an automatic way to save just the changes of a xml file? For example, if add several nodes, delete some and change the value or attribute of another. Actually, on saving it, the Save( ) method will serialize the entire file again. The doubt is if this behaviour can be changed, making the parser keep the file and saving only the changes. I have a customer asking for it, but I guess it is not possible, due to XML
2
1236
by: confus3d | last post by:
I was wondering if there are alterative xml messaing instead of SOAP, if their are what are the advantages / disadvantages ?
5
1355
by: dbsmilr | last post by:
This is what I want to do: <html> <xml id="myXml"> <book title="book1" /> <book title="book2" /> </xml> <div id="out"><!-- I would output the xml formatted nicely for the user in this div</div>
0
8871
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8783
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8552
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8640
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2773
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.