Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [HTML][CSS]validator
Forum PHP.pl > Forum > Przedszkole
ShadowD
  1. <?xml version="1.1" encoding="iso-8859-2"?>
  2.  
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl">
  5.  
  6. <meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-2" />
  7. <meta http-equiv="Content-Language" content="...,...,..." />
  8. <meta name="Keywords" content="...,...,..." />
  9. <meta name="Robots" content="..." />
  10. <meta name="Author" content="..." />
  11. <meta name="Description" content="..." />
  12.  
  13. <title> TITLE </title>
  14.  
  15. <link rel="stylesheet" type="text/css" href="style.css" />
  16.  
  17. </head>
  18.  
  19. <p> BODY </p>
  20.  
  21. </body>
  22. </html>


Dlaczego po wklejeniu powyszego kodu tu:
http://validator.w3.org/#validate_by_input

Wyżuca błąd z kodowaniem:

Cytat
Character Encoding Override in effect! The detected character encoding "utf-8" has been suppressed and "iso-8859-2" used instead.


Bez zdeklarowanych wartości strunę wykrywa jako utf-8 a po zdeklarowaniu na iso-8859-2 wyrzuca powywszy kod dlaczego?? W ogóle gdzie w tym kodzie jest mowa o utf-8??

Ps I dlaczego po zdeklarowaniu xhtml 1.1 wyrzuca:
Cytat
DOCTYPE Override in effect!

The detected DOCTYPE Declaration "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">" has been suppressed and the DOCTYPE for "XHTML 1.1" inserted instead, but even if no errors are shown below the document will not be Valid until you update it to reflect this new DOCTYPE.

Choć nie zdeklarowaną wykrywa właśnie jako xhtml 1.1 to po deklaracji dzieją się dziwne rzeczy... ;p
Pride
Wyrzuca ten błąd bo twój program w którym piszesz ową stronę koduję ją do UTF a ty mu odajesz ze jest ona w ISO smile.gif
ShadowD
Tz ja na pewno skopiowałem przez [ctrl]+[c] i [ctrl]+[v] z dobrze działającej stronki, więc na pewno jest dobrze zakodowane... ;p

Ale na pierwszy problem jest rozwiązanie schowek przekodowuje na utf, a drugie??

Mam rozumieć, że ten kod jest 100% poprawny i valigator nie powinien się czepiać??

Ps Odradzam wszystkim XHTML 1.1 1.0 jest normalniejszy ;p
Pride
Chodzi o to, że strona w tym momencie jest wyrywana jako 1.1 ale dopóki nie dodasz DOCTYPE do strony (do jej źródła) to nie będzie ona wykrywana jako 1.1
ShadowD
Omg nie czaje przecież ona ma doctype... ;p

Ok ale jak daje link do strony:
http://www.swiat--fantasy.xt.pl/

To mam:
Cytat
Conflict between Mime Type and Document Type

The document is being served with the text/html Mime Type which is not a registered media type for the XHTML 1.1 Document Type. The recommended media type for this document is: application/xhtml+xml

Using a wrong media type for a certain document type may confuse the validator and other user agents with respect to the nature of the document, and you may get some erroneous validation errors. How to fix this problem? One of the following techniques should help:

* If you are serving a static file on a Web server, changing its extension should help. Use e.g .xhtml for XHTML or .mathml for MathML.
* You may need to reconfigure your Web server. This Setting up MIME Types tutorial has instructions for Apache, Tomcat and IIS.
* If the document is generated dynamically, the scripting language should allow you to set up the mime type: this article on MIME Types and Content Negotiation has examples in PHP, Perl, and ASP.


Rozumiem, że nie da się tego naprawić, ponieważ po naprawie IE będzie pobierał plik zamiast go wyświetlić??

PS Nie liczę podmiany doctype dla IE...
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.