tidy
Armin
- html
Hallo,
warum meckert tidy eigentlich nicht an, wenn ich bei einem xhtml Dokument die Anführungszeichen bei den Attributwerten weglasse. Die sind doch bei xhtml vorgeschrieben. Bei diesem Fragment, habe ich z.B. mal bei method=post den Fehler eingebaut.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<title> new document </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="editplus" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
</head>
<body>
<form method=post action="">
</form>
</body>
</html>
---------------------------------------------------------------------
Ausgabe von tidy: (HTML Tidy for Windows released on 14 October 2008)
Info: Doctype given is "-//W3C//DTD XHTML 1.0 Transitional//EN"
Info: Document content looks like XHTML 1.0 Strict
No warnings or errors were found.
---------------------------------------------------------------------
validator.w3.org meckert den Fehler sofort an.
Configuration File Settings:
Name Type Current Value
=========================== ========= ========================================
accessibility-check enum 0 (Tidy Classic)
add-xml-decl Boolean no
add-xml-space Boolean no
alt-text String
anchor-as-name Boolean yes
ascii-chars Boolean no
assume-xml-procins Boolean no
bare Boolean no
break-before-br Boolean no
char-encoding Encoding ascii
clean Boolean no
css-prefix String
decorate-inferred-ul Boolean no
doctype DocType auto
doctype-mode Integer *1
drop-empty-paras Boolean yes
drop-font-tags Boolean no
drop-proprietary-attributes Boolean no
enclose-block-text Boolean no
enclose-text Boolean no
error-file String
escape-cdata Boolean no
fix-backslash Boolean yes
fix-bad-comments Boolean yes
fix-uri Boolean yes
force-output Boolean no
gnu-emacs Boolean no
gnu-emacs-file String
hide-comments Boolean no
hide-endtags Boolean no
indent AutoBool no
indent-attributes Boolean no
indent-cdata Boolean no
indent-spaces Integer 2
input-encoding Encoding latin1
input-xml Boolean no
join-classes Boolean no
join-styles Boolean yes
keep-time Boolean no
language String
literal-attributes Boolean no
logical-emphasis Boolean no
lower-literals Boolean yes
markup Boolean yes
merge-divs AutoBool auto
merge-spans AutoBool auto
ncr Boolean yes
new-blocklevel-tags Tag names
new-empty-tags Tag names
new-inline-tags Tag names
new-pre-tags Tag names
newline enum CRLF
numeric-entities Boolean no
output-bom AutoBool auto
output-encoding Encoding ascii
output-file String
output-html Boolean no
output-xhtml Boolean no
output-xml Boolean no
preserve-entities Boolean no
punctuation-wrap Boolean no
quiet Boolean no
quote-ampersand Boolean yes
quote-marks Boolean no
quote-nbsp Boolean yes
repeated-attributes enum keep-last
replace-color Boolean no
show-body-only AutoBool no
show-errors Integer 6
show-warnings Boolean yes
slide-style String
sort-attributes enum none
split Boolean no
tab-size Integer 8
tidy-mark Boolean yes
uppercase-attributes Boolean no
uppercase-tags Boolean no
vertical-space Boolean no
word-2000 Boolean no
wrap Integer 68
wrap-asp Boolean yes
wrap-attributes Boolean no
wrap-jste Boolean yes
wrap-php Boolean yes
wrap-script-literals Boolean no
wrap-sections Boolean yes
write-back Boolean no
Values marked with an *asterisk are calculated
internally by HTML Tidy
Gruß,
Armin
Hi,
warum meckert tidy eigentlich nicht an, wenn ich bei einem xhtml Dokument die Anführungszeichen bei den Attributwerten weglasse. Die sind doch bei xhtml vorgeschrieben.
literal-attributes Boolean no
Was passiert, wenn du die Option mal auf yes setzt?
MfG ChrisB
Hallo,
danke für die schnelle Antwort. Jetzt muss ich leider ganz dumm fragen, wie verändere ich eigentlich einen Parameter? Ich habe keine Konfigurationsdatei sondern nur die tidy.exe.
Gruß,
Armin.
Hi,
»» warum meckert tidy eigentlich nicht an, wenn ich bei einem xhtml Dokument die Anführungszeichen bei den Attributwerten weglasse. Die sind doch bei xhtml vorgeschrieben.
»» literal-attributes Boolean no
Was passiert, wenn du die Option mal auf yes setzt?
MfG ChrisB
Hi!
danke für die schnelle Antwort. Jetzt muss ich leider ganz dumm fragen, wie verändere ich eigentlich einen Parameter? Ich habe keine Konfigurationsdatei sondern nur die tidy.exe.
Dann lege eine an;) Mit der option -config kannst Du tidy dazu veranlassen, eine Konfigurationsdatei einzulesen.
Mehr erfährst Du hier.
off:PP
Hallo,
danke für den Tipp mit der Konfigurationsdatei. Das Funktioniert jetzt. Die Fehlenden Anführungszeichen werden jedoch immer noch nicht angemeckert. Ich glaube jetzt aber zu wissen warum: tidy korrigiert den Fehler anscheinend intern bereits und zeigt mir diesen nicht mehr als Fehler an:
Info: Doctype given is "-//W3C//DTD XHTML 1.0 Transitional//EN"
Info: Document content looks like XHTML 1.0 Strict
No warnings or errors were found.
<!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" xml:lang="de" lang="de">
<head>
<meta name="generator" content=
"HTML Tidy for Windows (vers 14 October 2008), see www.w3.org" />
<title>new document</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
<meta name="generator" content="editplus" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
</head>
<body>
<form method="post" action=""></form>
</body>
</html>
To learn more about HTML Tidy see http://tidy.sourceforge.net
Please fill bug reports and queries using the "tracker" on the Tidy web site.
Additionally, questions can be sent to html-tidy@w3.org
HTML and CSS specifications are available from http://www.w3.org/
Lobby your company to join W3C, see http://www.w3.org/Consortium
In der Quell Datei ist der Fehler aber enthalten.
<form method=post action=""></form>
Ich könnte den Fehler mit der Option -m auch in der Quelldatei automatisch korrigieren lassen, das möchte ich jedoch nicht. Tidy soll mir die Fehler nur anzeigen.
literal-attributes: yes hat leider nichts an dem Verhalten geändert.
Gruß,
Armin