Minz. Out of the box

xml lang reviewed

/2/9//03

I have been talking about the xml:lang attribute lately. There are a couple of things I found out, most of them a bit outdated, so I cannot be sure if all pieces of information are still valid. It seems that support for this attribute is more or less absent nowadays.

The absence of xml:lang support in Mozilla is documented at Bugzilla.

The IBM Homepage Reader doesn't support xml:lang as well, and support for the lang attribute seems to be flaky. It seems that assistive technology is still catching up for multilingual support.

So finally I think this issue shouldn't keep anyone away from using XHTML 1.1.

By the way, Anne van Kesteren made a good suggestion in the comments of the last post, talking about revamping the hreflang attribute as well as suggesting a titlelang attribute for the upcoming XHTML 2.0 specification. Personally, I really like the hreflang attribute, cause it is inevitable for multilingual sites to include this. I often find myself checking linked elements with Mozilla in order to be informed about the target's language. Consider the alternative. Marking every link with an additional comment like (Site is in english) would add a lot of "junk" to my content. I am wondering why this has been removed from the current XHTML 2.0 working draft.

Comments

Thomas Scholz:

'hreflang' benutze ich eigentlich immer. Im Stylesheet steht dann:
[hreflang]:after {
content: " (" attr(hreflang) ")";
}

Da ich XHTML grundsätzlich nicht mehr benutze, stellt sich mir die Frage nach Version 1.1 sowieso nicht. :)
Prinzipiell ist ein Document in XHTML 1.1 invalid, wenn es als text/html ausgeliefert wird, es sei denn, es sprechen außergewöhnliche Gründe dafür. Diese liegen imho nicht vor, wenn man ebenso gut eine andere Version von XHTML hätte nehmen können.
Aus der Accessibility-Perspektive heraus verbietet sich der Einsatz von XHTML aber sowieso in den meisten Fällen. Seine angebliche "Kompatibilität" zu HTML-UAs beruht doch nur auf der Annahme, daß diese UAs kaputt sind.

Thomas

Posted: 09/03/2003

Minz Meyer:

Jepp,

korrekt. Daher ja auch der Versuch, diese Page zumindest an Mozilla und Opera als application/xhtml/xml zu senden.
Eigentlich sollte dann auch noch die <?xml-stylesheet> Deklaration rein, aber dazu war ich dann doch zu faul (müsste ich ja den ganzen Styleswitcher umschreiben ;)

Die :after Pseudo-Elemente finde ich persönlich auch ganz praktisch und benutze sie im Print-Style für Verweise und Acronyme.

Posted: 09/03/2003

Ben:

Hm, good that you mention this about the styleswitcher. I was thinking of using one on my ampersand blog. I'll probably write one myself (in PHP) - I'll have to keep in mind the xml-stylesheet PI...

Posted: 09/04/2003

Anne van Kesteren:

The W3C has this example ( http://www.w3.org/TR/xml-stylesheet/ ):

<?xml-stylesheet alternate="yes" title="compact" href="small-base.css" type="text/css"?>

Posted: 09/06/2003