f



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

0
nhtcapri (183)
3/31/2006 12:26:43 PM
comp.text.xml 8781 articles. 0 followers. Post Follow

12 Replies
3654 Views

Similar Articles

[PageSpeed] 21


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/
0
mahotrash (2051)
3/31/2006 12:46:50 PM
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/

0
dorward1 (4)
3/31/2006 1:01:15 PM
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
0
richard91 (3692)
3/31/2006 2:49:28 PM
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/
0
pink (113)
3/31/2006 3:24:30 PM
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/
0
pink (113)
3/31/2006 3:29:09 PM
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/

0
nhtcapri (183)
3/31/2006 4:14:51 PM
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
0
dorward (199)
3/31/2006 5:40:23 PM
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)
0
koch8601 (279)
3/31/2006 6:26:24 PM
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
0
dorward (199)
3/31/2006 8:24:51 PM
"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/
0
jkorpela (371)
3/31/2006 8:53:40 PM
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
0
richard91 (3692)
3/31/2006 10:40:23 PM
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
0
pgoiffon1 (1)
4/3/2006 7:45:29 AM
Reply:

Similar Artilces:

Off Topic - Databindings and XML
Dear Group First of all, my apologies for posting here. I tried the MS groups but they're so useless. As some of you work with ASP.NET and XML I wondered if you have come across this and can give me some advice as this group is the only reliable source for an answer. Again, my apologies for posting it here. 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 s...

XHTML 1.1 spec: lang and xml:lang
Hello, I've looked at the latest XHTML spec from 2009-05-07. Referring to http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_commonatts In the I18N module, there are only two attributes listed: dir and xml:lang. The note in the last paragraph says: "Finally, note that the I18N collection only contains the xml:lang attribute unless the Bi- directional Text Module module is selected." This is fine, but... http://www.w3.org/TR/xhtml11/doctype.html says (last paragraph): "This specification also adds the lang attribute to the I18N attribute c...

To XML or not to XML?
Ok, it has been a while since I've needed to make an involved web page. Coming back on the scene now is a bit confusing, what with all the cool stuff to use like XML, PHP, MySQL, etc... So here is my question. I'm in search of a good dynamic way to generate web pages which separates content from presentation. I am seeking to create a web site that, to put it succinctly, has a list of users and sets of information corresponding to each user. I am familiar with how to do this using PHP, MySQL, and regular old HTML. I maintain the user database in MySQL and dynamically present it and th...

XML to XML
I have a gnucash file that I'm trying to transform into an identical XML file without the invoices. I've been at this for a while now. The gnucash file is in XML and the element I'm looking into is: <gnc:transaction> I want to ignore those that contain <slot:key>gncInvoice</slot:key> which is a child of slot which is a child of slots which is a child of transactions. Any help you're willing to provide would be greatly appreciated. Thanks. Classic application for XSLT. Start with the identity transformation, then add a template which matches the ones yo...

XML or not XML?
I am developing a simple MySQL database editor, and am looking into creating an PHP/AJAX app as the GUI. A lot of this in new ground, and much more is dusting off things I haven't used in a while. My question though involves whether or nor to employ XML. I did some XML a few years back, but don't typically bother anymore. As I see it XML is great when I need to have an app with a standard data presentation that other developers can easily interface. I.E. like a bank statement that may feed a variety of applications developed by a variety of clients. However, if I am develo...

embedding xml in xml as non-xml :)
Hi all, I have an application that logs in xml. Assume <xmlLog></xmlLog>. In this element the app logs anything it gets from foreign hosts. Now if the host sends xml data, the structure of the document changes. ie. <xmlLog><somTag></somTag></xmlLog>. This will cause problems with my log reader, because it assumes that <xmlLog/> contains non-xml data. My question is, is there a way to treat the data in the <xmlLog/> element as non xml data. Something I can do that would treat anything this element contains as a literal? Any help or ...

XML instead of text
Hello people, i do this on my domain: <?php header("Content-type: text/xml"); header("Content-Type: ".$contentType."; charset=UTF-8"); readfile("http://www.contra.gr/rss/home?type=latest"); ?> and i get the XML data from other domain as text. How can i get it as XML? Thanks, Nicos Nicos wrote: > Hello people, > i do this on my domain: > <?php > header("Content-type: text/xml"); > header("Content-Type: ".$contentType."; charset=UTF-8"); > readfile("http://www.contra.gr/rs...

file command: "XML document text" vs "XML document text"
I've just used the file command on four files of RDF-XML with the following output: augtfidf.rdf: XML document text kyoto.rdf: XML document text stuff.rdf: XML document text tfidf.rdf: XML document text What does it mean that one of them has an extra space between "XML" and "document"? -- The kid's a hot prospect. He's got a good head for merchandising, an agent who can take you downtown and one of the best urine samples I've seen in a long time. [Dead Kennedys t-shirt] On 16.10.2012 16:06, Adam Funk ...

Non-XML tagged value text to XML
I would like to use XSLT to translate some tagged value text to XML elements like this: Input Doc: <data>x=1.234 y=ABC z="Hello World"</data> Output Doc: <x>1.234</value> <y>ABC</y> <z>&quot;Hello World&quot;</z> Is XSLT up to the task? What would it look like? Most of the XSLT string processing code I've seen looks very verbose - can't be too efficient. mikea_59 wrote: > I would like to use XSLT to translate some tagged value text to XML > elements like this: > > Input Doc: > > <data>...

Cocoon XML to XML
Hello. I want t know if it's possible to use cocoon to run xml to xml pipeline without publishing anyelse, just pipeling ? Has somebody tried this ? Thanks ! 8:0) Cram TeXeD -- "La r�alit�, c'est ce qui refuse de dispara�tre quand on a cess� d'y croire." (Philip K.Dick) <http://texed75.free.fr> ...

XML to Canonical XML
I'm trying to find a Ruby package that will convert valid XML into canonical XML. I found the genx4r gem, but that just generates canonical XML. Any pointers appreciated. Gary Wright On Feb 12, 2008 11:47 AM, Gary Wright <gwtmp01@mac.com> wrote: > I'm trying to find a Ruby package that will convert valid XML into > canonical XML. > Define "canonical XML" James [Note: parts of this message were removed to make it a legal post.] http://www.w3.org/TR/xml-c14n On Feb 12, 2008 10:51 AM, James Britt <james.britt@gmail.com> wrote: > On Feb 12, ...

Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser)
Hello Usenet. I'm subject to some confusion with XML and UTF8. I'm working with XML-Simple and I try to decode some XML with with german umlauts (ISO-8859-1). The first XML line declared the encoding correct (see code below). But I'm getting different results using XML-Simple with the default XML parser named XML::Sax and a second parser named XML::Parser. The following code tries to decode the mini XML file and prints the UTF8 flags of the resulting strings. Can someone run this code on his machine and post the results? Thanks. The results on my machine are this: ���ä...

XML to XML conversion
Hello, I vageuly remember a standard that allowed for an XML document using one tag vocabulary to be translated to a diffirent XML document using a diffirent tag vocabulary using the information provided in a kind of dictionary XML pointed to in an URL present in the original XML file. I am very interested in trying it out for various applications, but I can't find anything on the internet about it, since I don't remember it's name, only the general appearance. Can anyone help me with this? What I remember, approximately: The idea is that you have one XML file, in which th...

xml from 2 xml
Hi to everybody, would I like to create a consequential xml from the elaboration of two files xml using xslt, but is it possible to give in input to a trasform 2 files xml? thanks for the possible answers I have already found from me the answer: the function document('file2.xml') matatu ha scritto: > Hi to everybody, > > would I like to create a consequential xml from the elaboration of two > files xml using xslt, but is it possible to give in input to a trasform > 2 files xml? > > thanks for the possible answers ...

Web resources about - Why xml:lang instead of lang? - comp.text.xml

Resources last updated: 1/29/2016 12:09:05 AM