Previous section: HTML and SGML
Up to main index

[see parent document for copyright information]


Section 3: KGV's error messages

KGV's error messages come straight from nsgmls, and are generally more understandable than the sgmls error messages returned by WebTechs, but still sometimes confusing. I've listed here some of the more common errors produced by KGV, along with (hopefully) understandable English explanations.

Note that this section is incomplete. I add error messages as I encounter them. If you run into an error that isn't listed here, let me know and I'll try to add it.

entity end not allowed in comment
Unterminated comment. The position indicator points to the very end of the file, where the problem was detected; to find the beginning of the comment, try searching for the last occurrence of `<!--' in the document. See the discussion on comment syntax for more information.
name start character invalid: only s and comment allowed in comment declaration
Unterminated comments again. This time, you have a case like:
    <!-- This is the first unterminated comment >
    <!-- This is the second one >

KGV (correctly) interprets the `--' in the second comment as terminating the first comment, and then interprets the text of the second comment as text between comments, which is not allowed. See the discussion on comment syntax for more information.

invalid comment declaration: found name character outside comment but inside comment declaration
A slightly different version of the previous error. You probably have something like:
    <!---- This is not really inside a comment ---->
Despite appearances, the `-' character is significant inside comment declarations. See the discussion on comment syntax for more information.
unknown declaration type `FOO'
Most likely an invalid comment of the form <!invalid comment>; KGV is (correctly) attempting to interpret it as an SGML markup declaration. See the discussion on comment syntax for more information.
an attribute value must be a literal unless it contains only name characters
You have an attribute whose value needs to be in quotes. If an attribute value contains any character other than letters, digits, hyphens and periods, it must be enclosed in double quotes (single quotes would also be okay from an SGML standpoint, but some browsers don't recognize them). In particular, URL's almost always have to be in quotes, as do the attribute values for some Netscape extensions:
character `X' not allowed in attribute specification list
KGV has found a character inside an HTML tag that isn't allowed there. This usually means you didn't put an attribute value in quotes when necessary. It also probably means that the character in question is not allowed in the value of the attribute at all, or you would have received the previous error instead. See below for more information.

You can also get in trouble by forgetting the closing quote on an attribute. For instance:

    <IMG SRC="http://foo.com/fred.gif>
    <IMG SRC="http://foo.com/joe.gif>

KGV will (correctly) interpret this as a SRC value of "http://foo.com/fred.gif> <IMG SRC=", and then choke on the following `:'. In this case, the position indicator in the error message may be several lines below the line with the missing quote.

length of attribute value must not exceed LITLEN less NORMSEP (1022)
This usually occurs in conjunction with the previous error. It almost always means that you've forgotten a closing quote on an attribute value. For instance, in:
    <IMG SRC="fred.gif>
    <!-- 50 lines of stuff -->
    <IMG SRC="joe.gif">

the SRC value for the first <IMG> is the entire fifty lines of stuff up to the next double quote, which probably exceeds the SGML-defined length limit for HTML string literals. Note that the position indicator in the error message points to where the attribute value ended --- in this case, the "joe.gif" line.

element `FOO' undefined
You've used an unknown tag (represented here by FOO). If your page is written for Netscape, make sure you're using the corresponding public identifier; see the discussion on choosing a document type for more information.

If the tag in question is a frame-related tag, you're out of luck; WebTechs' Mozilla DTD, which KGV uses, does not recognize frames.

document type does not allow element "FOO" here
Straightforward, but not terribly informative. ;) There are a lot of different errors that will generate this error message:
document type does not allow element "FOO" here; assuming missing "BAR" start-tag
Similar to the previous error, but more specific: in this case, you have a FOO element that is not contained in a BAR element when FOO is not allowed outside of BAR. Some of the most common causes of this error are:

KGV has inserted a BAR start tag where it thinks there needs to be one; it will probably complain later on that the corresponding end tag is also missing.

there is no attribute `FOO'
You have used an attribute with an element that is defined not to have that attribute. This is most commonly caused by using Netscape-specific attributes like BGCOLOR and TEXT for <BODY> without setting the document type appropriately, and less commonly by using an HTML 3.0-specific attribute like PLAIN for <UL> or HEIGHT or WIDTH for <IMG> without identifying your document as HTML 3.0. See the discussion on choosing a document type for more information.

If you're using the HTML 3.2 DTD, you'll unfortunately get this error for any attribute of the STYLE or SCRIPT elements. HTML 3.2 represents the "state of the art" as of about January 1996, and so has only minimal support for these elements. The Microsoft IE 3.0 DTD and the Cougar DTD have more complete definitions of these elements.

`FOO' is not a member of the group specified in the declared value of this attribute
Similar to the previous error; this time, you're using an attribute that is defined for the element, but with a value that isn't defined for the attribute. For instance, the Netscape extension <IMG ALIGN=ABSMIDDLE> will cause this error; ABSMIDDLE isn't one of the allowed values for the ALIGN attribute of <IMG> (unless, of course, you provided a Netscape document type, as described in section 1).

If you're using the Netscape document type, the BORDER attribute of <TABLE> can cause this error. See the discussion of Netscape and tables for more information.

This error can also be caused, oddly enough, by missing close quotes on attribute values. For instance, given:

    <IMG SRC="fred.gif> <IMG SRC="joe.gif>

KGV will (correctly) see a SRC attribute of "fred.gif> <IMG SRC=", and then try to interpret JOE.GIF as an attribute of <IMG>.

syntax of attribute value does not conform to declared value
Yet another attribute error; this time, the attribute in question was defined to take a numeric value, or an SGML identifier value, and you used a character that doesn't match what it was expecting.

One potentially annoying source of this error is the TD WIDTH attribute. Whether intentionally or by oversight, the HTML 3.2 DTD defines this attribute to have a value type of NUMBER, which means that <TD WIDTH="50%"> is not allowed.

value of attribute "FOO" invalid: "#" cannot start a name
A special case of the previous error; the attribute in question is defined to take as value an SGML name token, which must begin with a letter.
`FOO' is not a member of a group specified for any attribute
Another attribute error, this time referring to an "abbreviated" attribute. SGML allows you to omit the name of an attribute if the attribute value is unambiguous. For instance, <IMG ISMAP> is actually an abbreviation of <IMG ISMAP=ISMAP>. (Technically, this also means that e.g. <P ALIGN=CENTER> could be abbreviated to <P CENTER>, but it is unlikely that current browsers will get this right.) KGV has found something that looks like an abbreviated attribute but doesn't match the value of any attribute for this element. For instance, a typo like <IMG ISNAP> would produce this error.

A missing close quote on a previous attribute value can also trigger this error if the next quote it finds is followed by something that looks like an abbreviated attribute; for instance, <IMG SRC="fred.gif><IMG SRC="joe.gif> would produce this error, referring to the "attribute value" JOE.GIF.

required attribute `FOO' not specified
You left off a required attribute of the indicated element. The most common such omitted attribute is the ALT attribute of the AREA element; browsers will typically use these to build a menu equivalent to your client-side imagemap if the user has disabled image loading, so you'll want to use a meaningful value here.
end tag for `FOO' omitted, but its declaration does not permit this
You forgot to close something. FOO is the element you forgot to close (and the next message, `start tag was here' points to the particular instance of FOO in question); the positional indicator points to where KGV expected you to close the element. There are a few common ways that this can happen:
end tag for element "FOO" which is not open
KGV found an end tag, represented here by FOO, without a corresponding start tag. This frequently occurs in conjunction with the previous error. For instance, given <B><I>nope</B></I>, KGV will insert a </I> before the </B>, and then will find the </I> after the </B> and will have nothing to match it with.

A subtle variation of this is <P><H4>fake font change</H4></P>. <H4>'s aren't allowed inside <P>'s, but since HTML allows you to omit the </P> end tag for paragraphs, KGV assumes that you meant <P></P><H4>fake font change</H4></P>, in which case the final </P> is indeed superfluous.

This error can also be caused by incorrectly supplying an end tag for "empty" elements like <HR>, <BR> or <IMG>.

end tag for `FOO' which is not finished
You have a FOO element, but you have omitted some required sub-element of it. For instance, a TABLE with no TR's would cause this error.
start tag for `FOO' omitted, but its declaration does not permit this
KGV expected you to start a FOO element at the indicated point. This probably means you've put unadorned text somewhere it isn't allowed; for instance, <UL>fake indent</UL> will cause this error.
general entity `FOO' not defined and no default entity
KGV has found an entity (something like &this;) that it doesn't recognize. There are a few possibilities:
non SGML character number ###
You've used an illegal character in your text. HTML uses the standard ISO8859-1 character encoding, and ISO8859-1 leaves undefined 65 character codes (0 to 31 inclusive and 127 to 159 inclusive); KGV has found one of these undefined characters in your document. The character may appear on your browser as a curly quote, or a trademark symbol, or some other fancy glyph; on a different computer, however, it will likely appear as a completely different character, or nothing at all.

Your best bet is to replace the character with the nearest equivalent ASCII character, or to use an appropriate character entity. For more information on ISO8859-1, see Alan Flavell's excellent ISO8859-1/HTML reference.

This error can also be triggered by formatting characters embedded in documents by some word processors. If you use a word processor to edit your HTML documents, be sure to use the "Save as ASCII" or similar command to save the document without formatting information.

`####' is not a valid character number
You'll get several occurrences of this error if you use the Cougar DTD. Cougar uses the 16-bit UCS-4 (a.k.a. "Unicode") character set instead of the 8-bit ISO8859-1 character set used by HTML 2.0 and HTML 3.2. It also defines mnemonic entities for various Unicode characters; for instance, the entity &trade; is defined as the character entity &#8482;, which is the Unicode trademark character. Unfortunately, the nsgmls executable used by KGV does not appear to have 16-bit character support compiled in, and so it chokes on these 16-bit character entities.

These errors are not produced by anything in your document and should not otherwise affect the validation of your document, so you can pretty much ignore them.

cannot generate system identifier for entity `HTML'
Your DOCTYPE declaration contains a public identifier that KGV doesn't recognize. See the discussion of DOCTYPE for an explanation of what's happening, and what public identifiers KGV recognizes.

Note that all of the rest of the errors you received are meaningless; KGV was unable to find a DTD to work from, and thus could not validate your document.

ld.so: call to undefined procedure _strerror from 0xd80f4
This error is symptomatic of a particular DOCTYPE declaration generated by a popular HTML editor. You will have to replace this DOCTYPE with a correct one before attempting to validate your page; replacing it with a Netscape DOCTYPE may produce fewer errors in the short run, but this error usually presages a lot of cleanup work in any event. See the warning in the discussion of DOCTYPE for an explanation of what's happening.

Note that all of the rest of the errors you received are meaningless; KGV was unable to find a DTD to work from, and thus could not validate your document.


Previous section: HTML and SGML
Up to main index

[see parent document for copyright information]

Sending feedback? Check here first.

HTML 2.0 Checked!

Last update 11 Jul 98.

dsb@killerbunnies.org