Apache und XHTML/XML

Apache, Lighttpd, nginx, Cherokee
Post Reply
Anonymous
 

Apache und XHTML/XML

Post by Anonymous »

Zur zeit stelle ich meine ganzen HTML Quellcodes auf XHTML um. Daher sollte ich auch meinen apache konfigurieren. Wie bringe ich apache dazu meine xhtml Dokumente zu parsen?

die beginnen ja bekanntlich so, was ja ein servermarkup darstellt und daher vom apache geparst werden muss (?):

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

...

mfg

scraper
suntzu
Posts: 669
Joined: 2002-12-20 19:47
Location: Mönchengladbach
Contact:
 

Re: Apache und XHTML/XML

Post by suntzu »

Hi,

eigentlich solltest du beim Webserver gar nix umstellen müssen da XHTML eine Erweiterung von HTML ist und auf dem Client ausgeführt wird.

Der IE hat allerdings da noch nicht so den Dreh raus und macht öfters Probleme.

Schau dir am Besten selfHTML an, da steht alles erklärt.

Gruß,
Dominik
arty
Userprojekt
Userprojekt
Posts: 729
Joined: 2002-06-12 10:11
Contact:
 

Re: Apache und XHTML/XML

Post by arty »

Scraper wrote:Zur zeit stelle ich meine ganzen HTML Quellcodes auf XHTML um. Daher sollte ich auch meinen apache konfigurieren. Wie bringe ich apache dazu meine xhtml Dokumente zu parsen?

die beginnen ja bekanntlich so, was ja ein servermarkup darstellt und daher vom apache geparst werden muss (?):
Der Apache parst keine (X)HTML-Dokumente. Und was bitte schön ist ein Servermarkup?

bye
arty
oxygen
Posts: 2138
Joined: 2002-12-15 00:10
Location: Bergheim
 

Re: Apache und XHTML/XML

Post by oxygen »

Wenn html durch den PHP Interpreten gejagt wird und Shorttags aktiviert sind, macht folgendes Probleme:

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1"?>
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Apache und XHTML/XML

Post by Joe User »

Scraper wrote:Zur zeit stelle ich meine ganzen HTML Quellcodes auf XHTML um.
Was sind denn "HTML Quellcodes"? :arrow: http://www.w3.org/MarkUp/
Scraper wrote:Daher sollte ich auch meinen apache konfigurieren. Wie bringe ich apache dazu meine xhtml Dokumente zu parsen?
Apache parst kein (X)HTML, weshalb man ihm dieses auch nicht "beibringen" muss.
Scraper wrote:die beginnen ja bekanntlich so, was ja ein servermarkup darstellt und daher vom apache geparst werden muss (?):
http://www.google.com/search?hl=en&ie=U ... gle+Search
Scraper wrote:<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
http://www.w3.org/TR/xhtml1/
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Apache und XHTML/XML

Post by Joe User »

øxygen wrote:Wenn html durch den PHP Interpreten gejagt wird und Shorttags aktiviert sind, macht folgendes Probleme:

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1"?>

Code: Select all

<?php echo '<?xml version="1.0" encoding="UTF-8"?>'."n"; ?>
<?php echo '<?xml-stylesheet type="text/css" href="/style.css"?>'."n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Anonymous
 

danke

Post by Anonymous »

nana... daher also die parser fehlermeldungen des IE... lol... irgendiwie logisch, dass das ganze zeug nicht geparst werden muss... trotzdem danke!

mfg

scraper
majortermi
Userprojekt
Userprojekt
Posts: 916
Joined: 2002-06-17 16:09
 

Re: Apache und XHTML/XML

Post by majortermi »

Du musst in der php.ini die Option "short_open_tag" deaktivieren.
Erst nachlesen, dann nachdenken, dann nachfragen... :)
Warum man sich an diese Reihenfolge halten sollte...
flo
Posts: 2223
Joined: 2002-07-28 13:02
Location: Berlin
 

Re: Apache und XHTML/XML

Post by flo »

Hi,

das ganze macht doch nur dann Probleme, wenn auch .html über die PHP-Engine läuft, oder? Ich hab bis jetzt keine Probleme damit.

flo.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: danke

Post by Joe User »

Scraper wrote:nana... daher also die parser fehlermeldungen des IE... lol...
Man kann dem IE vieles anlasten, aber nicht alles...
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
olaf1234
Posts: 11
Joined: 2003-12-29 21:00
 

Re: Apache und XHTML/XML

Post by olaf1234 »

Mein Kenntnisstand ist der, dass sowas <?xml version="1.0" encoding="ISO-8859-1"?> keinen Browser interessiert. Außerdem schaltest du den IE6 damit in den Quirks-Modus, was heißt er verwendet das falsche Box-Model.

Einfach entfernen, mit dem Server hat das nichts zu tun.

Grüße Olaf
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Apache und XHTML/XML

Post by Joe User »

olaf1234 wrote:Mein Kenntnisstand ist der, dass sowas <?xml version="1.0" encoding="ISO-8859-1"?> keinen Browser interessiert.
Selbst wenn dem so wäre, ändert es nichts am Standard.
olaf1234 wrote:Außerdem schaltest du den IE6 damit in den Quirks-Modus, was heißt er verwendet das falsche Box-Model.
Und?
olaf1234 wrote:Einfach entfernen
HTML != XHTML
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
olaf1234
Posts: 11
Joined: 2003-12-29 21:00
 

Re: Apache und XHTML/XML

Post by olaf1234 »

Oh, sorry, ich wollte nicht oberklug erscheinen :oops:

Die XML-Deklaration ist in XHTML optional und kann weggelassen werden, wenn der Zeichensatz anderweitig, am besten serverseitig angegeben wird.

Zum Boxmodel

Grüße Olaf
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Apache und XHTML/XML

Post by Joe User »

olaf1234 wrote:Die XML-Deklaration ist in XHTML optional und kann weggelassen werden, wenn der Zeichensatz anderweitig, am besten serverseitig angegeben wird.
http://www.w3.org/TR/xhtml11/conformance.html#strict
olaf1234 wrote:Zum Boxmodel
Bekannt. Die (X)HTML Standards und professionelle "Webdesigner" nehmen keine Rücksicht auf kaputte UAs...
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
olaf1234
Posts: 11
Joined: 2003-12-29 21:00
 

Re: Apache und XHTML/XML

Post by olaf1234 »

Ich will wirklich kein Streit :wink:

http://www.w3.org/TR/xhtml11/conformance.html#strict

Aber das ist xhtml1.1, und selbst da steht:
Note that in this example, the XML declaration is included. An XML declaration like the one above is not required in all XML documents. XHTML document authors are strongly encouraged to use XML declarations in all their documents. Such a declaration is required when the character encoding of the document is other than the default UTF-8 or UTF-16.
olaf1234 wrote:Zum Boxmodel


Bekannt. Die (X)HTML Standards und professionelle "Webdesigner" nehmen keine Rücksicht auf kaputte UAs...
Bin kein "professioneller", möchte nur das meine Besucher meine Seiten gescheit angezeigt bekommen.

Aber ist schon gut, lassen wirs darauf beruhen. Scraper wird inzwischen seine Lösung herausgefunden haben. Und darum gings ja eigentlich.

Grüße Olaf
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Apache und XHTML/XML

Post by Joe User »

olaf1234 wrote:Ich will wirklich kein Streit :wink:
Dito ;)
olaf1234 wrote:Aber das ist xhtml1.1, und selbst da steht:
Gleiches steht auch bei XHTML 1.0 und XHTML 2.0 ;)
olaf1234 wrote:XHTML document authors are strongly encouraged to use XML declarations in all their documents. Such a declaration is required when the character encoding of the document is other than the default UTF-8 or UTF-16.
...strongly encouraged...required...is other than the default UTF-8 or UTF-16.
olaf1234 wrote:Bin kein "professioneller", möchte nur das meine Besucher meine Seiten gescheit angezeigt bekommen.
Dann solltest Du HTML 4.01 strict verwenden...
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Post Reply