[WEB4LIB] DOCTYPE declaration for invalid page
Eric Hellman
eric at openly.com
Wed Nov 1 14:17:59 EST 2000
The ampersand in attribute value problem is a good way to tell
whether a person, site or tool really believes in standards. It has
never been legal, in any version of HTML, to put a bare ampersand in
an HTML attribute value. However, "&" is perfectly legal and very
common in URI's. It is the job of the browser software to parse the
HTML and convert "&" to "&", when found in the href attribute of
an anchor element (or any attribute value, for that matter. If
something or someone generates HTML, it is up to them to convert the
"&" in the URI to "&" in HTML.
URI's in a catalog record are not HTML, so they should have the bare
ampersands in them. If your web OPAC does not convert the "&" to
"&" in the HTML it produces, then that is a BUG, and you should
complain to the vendor. (Don't get your hopes up. I pointed this bug
out to the chief software architect of one of the major OPAC vendors
and he dismissively said "So what?")
In practice, web browser software is very tolerant of HTML syntax
errors, and this one will almost never give you a problem because it
is the most common syntax error on the web. (unless you make a form
with an input named "amp"!)
And to answer your question, a doctype declaration won't hurt anyone,
unless maybe it's an XML doctype. leaving out the doctype declaration
doesn't make the bare ampersands any less invalid.
Eric
At 10:14 AM -0800 11/1/00, James Ghaphery wrote:
>Hi all,
>
>I'm trying to get my head around the HTML standards and have been running
>my pages through the w3c validator http://validator.w3.org It's been very
>helpful for my buggy code.
>
>What is the advice from any standards gurus out there for pages that cannot
>be validated. Should they include a DOCTYPE declaration or not?
>
>In particular a number of my pages cannot be validated due to the HTML
>standard for *not* using an ampersand in a URI, and instead using "&".
>http://www.w3.org/TR/html4/appendix/notes.html#h-B.2.2
>
>A curious library problem with this part of the standard is in the 856
>field of a catalog record. If one still has telnet access to the catalog it
>seems that the URI must not follow the HTML standard or else an incorrect
>address will be displayed in the telnet version.
>
>--Jimmy Ghaphery
>
>
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>Jimmy Ghaphery
>VCU Libraries
>Virginia Commonwealth University
>901 Park Avenue
>P.O. Box 842033
>Richmond, VA 23284-2033
>TELEPHONE: (804) 828-1103
>FAX: (804) 828-0151
>jsghaphe at vcu.edu
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Eric Hellman
Openly Informatics, Inc.
http://www.openly.com/ 21st Century Information Infrastructure
LinkBaton: Your Links that Learn http://my.linkbaton.com/
More information about the Web4lib
mailing list