Minz schaut über den Tellerrand

Eingefügtes XML (Extensible Markup Language)

9/15/2003

Da in letzter Zeit verstärkt über semantisches Markup diskutiert wird (hier ging es vor kurzem und Navigationslisten und Überschriften) und XHTML 2.0 (welches das nl Element für Navigationslisten einführt) noch weit entfernt zu sein scheint, habe ich, als Teil einer Aufgabe meines XHTML-Kurses, folgendes ausprobiert.

Ich fügte sogenanntes inline XML in ein XHTML Dokument, um eine ganz individuelle Navigationsliste zu erstellen (nach eigenem semantischem Gusto ;)).
Es funktioniert erstaunlich gut im Internet Explorer 6, Mozilla 1.4 und Opera 7 (alles Windows). Dummerweise behandeln alle Browser die Datei als text/html. Nun ist diese Datei alles mögliche, nur kein reines HTML. Also habe ich einmal den Inhaltstypen (Content-Type) geändert.
Ergebnis: Der Internet Explorer gerät gänzlich durcheinander, Mozilla wendet die CSS-Stile nicht mehr an (das war eine Überraschung). Der einzige Browser, der seinen Job gut macht (bzw. das tut, was ich erwartet habe ;)) ist Opera. Wer das ganze einmal live sehen möchte, bittesehr:

MIME Type: text/html
http://xhtml2.researchkitchen.de/wk5_project_texthtml.php
MIME Type: application/xml
http://xhtml2.researchkitchen.de/wk5_project_xml.php
MIME Type: text/xml
http://xhtml2.researchkitchen.de/wk5_project_textxml.php
MIME Type: application/xhtml+xml
http://xhtml2.researchkitchen.de/wk5_project_xhtml.php

Seht es mir bitte nach, falls ich was wesentliches übersehen habe, aber dieses ist mein erster Versuch mit inline XML. Nun frage ich mich ob das Browserprobleme sind, oder ob irgendwas prinzipiell falsch ist an der Sache. Die Beispieldatei, die ich mir angeschaut habe funktioniert im Mozilla und wird als application/xml gesendet. Sie referenziert auf einen Artikel von A List Apart.

Randbemerkung: Ja, ich weiss, dass die Datei kein valides XHTML ist...

Kommentare

Anne van Kesteren:

You should actually use CSS3 selectors ;). \: is out of date, but you made some great tests.

One question though, why didn't you use XHTML2.0 nl and the label element. You could have used the XHTML2.0 namespace and don't bother about creating elements yourself. W3C is currently offline, but you should find the selectors here (I think): www.w3.org/tr/css3-selectors/

Abgegeben am 9/15/2003 um 33:35 PM

Minz Meyer:

Of course I am aware of the nl element and the selectors you mentioned. But neither the XHTML 2.0 nor CSS3 are currently recommendations, so I went away with the given specifications.

But you are right, maybe a navigation list wasn't the best choice for my samples...

Abgegeben am 9/15/2003 um 40:28 PM

Anne:

I found it!

/: seems to be invalid, see this Mozilla bug
http://bugzilla.mozilla.org/show_bug.cgi?id=26024

PS: I didn't searched 15 days for this, just wanted to know today :).

Abgegeben am 9/24/2003 um 22:50 PM

Minz Meyer:

Well, thank you Anne (once again ;)) for this one.

I wouldn't call it invalid, it is more a kind of a fallback solution.
I'll take together all I have gathered so far and summarize it in a new entry.

Abgegeben am 9/24/2003 um 27:11 PM