By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,623 Members | 1,301 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,623 IT Pros & Developers. It's quick & easy.

phase5: <!--DATE--> produces sometimes error

P: n/a
I'm a little confused:

htmled phase5 uses this Date-Tag:
<!--DATE-->28.03.2004<!--/DATE-->

If I try to validate the source, sometimes I get an error, sometimes not.

This source:
http://www.sonoptikon.de/akkordeon/assahra.html

makes two errors.

Another source not:
http://www.sonoptikon.de/index.php

The difference is only: php or not

I opened the source of the last page and copied the relevant lines into
the first source, so that in both sources there is the same text.

Nevertheless first source has two errors, the second none.

Thanks for help

Werner
--
-----------------------------------------------------------
Werner Partner * Tel +49 2366 886606 * Fax: 886608
mailto:ka****@sonoptikon.de * http://www.sonoptikon.de
hören Sie Klassik: http://www.drmk.ch/
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Werner Partner <ka****@sonoptikon.de> wrote:
This source:
http://www.sonoptikon.de/akkordeon/assahra.html

makes two errors.
Yet it contains the cargo cult icon claiming conformance to
HTML 4.01. And it doesn't actually even come close, since it uses XHTML
syntax. Oh well.
The difference is only: php or not


No, PHP is immaterial. The validator, or the browser, does not even know
whether the document has been generated by PHP or not.

Your source of confusion is the use of "--", especially in
<!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" -->
where the "--" actually starts a comment, so parsing a validator becomes
very different from what you expect. The "--" pair matches the next "--",
and everything between them is skipped (in correct parsing, as in a
validator, though not as in browsers). When you have <!----> (why?), then
the second "--" pair starts a new comment, etc.

Comments considered harmful in HTML.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #2

P: n/a
Jukka K. Korpela schrieb:
Werner Partner <ka****@sonoptikon.de> wrote:

This source:
http://www.sonoptikon.de/akkordeon/assahra.html

makes two errors.

Yet it contains the cargo cult icon claiming conformance to
HTML 4.01. And it doesn't actually even come close, since it uses XHTML
syntax. Oh well.

The difference is only: php or not

No, PHP is immaterial. The validator, or the browser, does not even know
whether the document has been generated by PHP or not.

Your source of confusion is the use of "--", especially in
<!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" -->
where the "--" actually starts a comment, so parsing a validator becomes
very different from what you expect. The "--" pair matches the next "--",
and everything between them is skipped (in correct parsing, as in a
validator, though not as in browsers). When you have <!----> (why?), then
the second "--" pair starts a new comment, etc.

Comments considered harmful in HTML.

kiitos apusta - vika heti löytetty!!

I always looked on the false place

thanks

Werner

--
-----------------------------------------------------------
Werner Partner * Tel +49 2366 886606 * Fax: 886608
mailto:ka****@sonoptikon.de * http://www.sonoptikon.de
hören Sie Klassik: http://www.drmk.ch/
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.