2011-11-01 04:33:11 -07:00
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is HTML parser error reporting code.
#
# The Initial Developer of the Original Code is
# Mozilla Foundation.
# Portions created by the Initial Developer are Copyright (C) 2011
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Henri Sivonen <hsivonen@iki.fi>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
# The bulk of the messages in this file are derived from
# http://hg.mozilla.org/projects/htmlparser/file/1f633cef7de7/src/nu/validator/htmlparser/impl/ErrorReportingTokenizer.java
# which is available under the MIT license.
2011-11-01 04:33:11 -07:00
# Tokenizer errors
2011-11-04 06:36:29 -07:00
errGarbageAfterLtSlash = Garbage after “</”.
errLtSlashGt = Saw “</>”. Probable causes: Unescaped “<” (escape as “<”) or mistyped end tag.
2011-11-01 04:33:11 -07:00
errCharRefLacksSemicolon = Character reference was not terminated by a semicolon.
errNoDigitsInNCR = No digits in numeric character reference.
2011-11-04 06:36:29 -07:00
errGtInSystemId = “>” in system identifier.
errGtInPublicId = “>” in public identifier.
2011-11-01 04:33:11 -07:00
errNamelessDoctype = Nameless doctype.
2011-11-04 06:36:29 -07:00
errConsecutiveHyphens = Consecutive hyphens did not terminate a comment. “--” is not permitted inside a comment, but e.g. “- -” is.
errPrematureEndOfComment = Premature end of comment. Use “-->” to end a comment properly.
2011-11-01 04:33:11 -07:00
errBogusComment = Bogus comment.
2011-11-04 06:36:29 -07:00
errUnquotedAttributeLt = “<” in an unquoted attribute value. Probable cause: Missing “>” immediately before.
errUnquotedAttributeGrave = “`” in an unquoted attribute value. Probable cause: Using the wrong character as a quote.
2011-11-01 04:33:11 -07:00
errUnquotedAttributeQuote = Quote in an unquoted attribute value. Probable causes: Attributes running together or a URL query string in an unquoted attribute value.
2011-11-04 06:36:29 -07:00
errUnquotedAttributeEquals = “=” in an unquoted attribute value. Probable causes: Attributes running together or a URL query string in an unquoted attribute value.
errSlashNotFollowedByGt = A slash was not immediate followed by “>”.
2011-11-01 04:33:11 -07:00
errNoSpaceBetweenAttributes = No space between attributes.
2011-11-04 06:36:29 -07:00
errUnquotedAttributeStartLt = “<” at the start of an unquoted attribute value. Probable cause: Missing “>” immediately before
errUnquotedAttributeStartGrave = “`” at the start of an unquoted attribute value. Probable cause: Using the wrong character as a quote.
errUnquotedAttributeStartEquals = “=” at the start of an unquoted attribute value. Probable cause: Stray duplicate equals sign.
2011-11-01 04:33:11 -07:00
errAttributeValueMissing = Attribute value missing.
2011-11-04 06:36:29 -07:00
errBadCharBeforeAttributeNameLt = Saw “<” when expecting an attribute name. Probable cause: Missing “>” immediately before.
errEqualsSignBeforeAttributeName = Saw “=” when expecting an attribute name. Probable cause: Attribute name missing.
errBadCharAfterLt = Bad character after “<”. Probable cause: Unescaped “<”. Try escaping it as “<”.
errLtGt = Saw “<>”. Probable causes: Unescaped “<” (escape as “<”) or mistyped start tag.
errProcessingInstruction = Saw “<?”. Probable cause: Attempt to use an XML processing instruction in HTML. (XML processing instructions are not supported in HTML.)
errUnescapedAmpersandInterpretedAsCharacterReference = The string following “&” was interpreted as a character reference. (“&” probably should have been escaped as “&”.)
errNotSemicolonTerminated = Named character reference was not terminated by a semicolon. (Or “&” should have been escaped as “&”.)
errNoNamedCharacterMatch = “&” did not start a character reference. (“&” probably should have been escaped as “&”.)
errQuoteBeforeAttributeName = Saw a quote when expecting an attribute name. Probable cause: “=” missing immediately before.
errLtInAttributeName = “<” in attribute name. Probable cause: “>” missing immediately before.
2011-11-01 04:33:11 -07:00
errQuoteInAttributeName = Quote in attribute name. Probable cause: Matching quote missing somewhere earlier.
errExpectedPublicId = Expected a public identifier but the doctype ended.
errBogusDoctype = Bogus doctype.
maybeErrAttributesOnEndTag = End tag had attributes.
2011-11-04 06:36:29 -07:00
maybeErrSlashInEndTag = Stray “/” at the end of an end tag.
2011-11-01 04:33:11 -07:00
errNcrNonCharacter = Character reference expands to a non-character.
errNcrSurrogate = Character reference expands to a surrogate.
errNcrControlChar = Character reference expands to a control character.
errNcrCr = A numeric character reference expanded to carriage return.
errNcrInC1Range = A numeric character reference expanded to the C1 controls range.
errEofInPublicId = End of file inside public identifier.
errEofInComment = End of file inside comment.
errEofInDoctype = End of file inside doctype.
errEofInAttributeValue = End of file reached when inside an attribute value. Ignoring tag.
errEofInAttributeName = End of file occurred in an attribute name. Ignoring tag.
2011-11-04 06:36:29 -07:00
errEofWithoutGt = Saw end of file without the previous tag ending with “>”. Ignoring tag.
2011-11-01 04:33:11 -07:00
errEofInTagName = End of file seen when looking for tag name. Ignoring tag.
errEofInEndTag = End of file inside end tag. Ignoring tag.
2011-11-04 06:36:29 -07:00
errEofAfterLt = End of file after “<”.
2011-11-01 04:33:11 -07:00
errNcrOutOfRange = Character reference outside the permissible Unicode range.
errNcrUnassigned = Character reference expands to a permanently unassigned code point.
errDuplicateAttribute = Duplicate attribute.
errEofInSystemId = End of file inside system identifier.
errExpectedSystemId = Expected a system identifier but the doctype ended.
errMissingSpaceBeforeDoctypeName = Missing space before doctype name.
2011-11-04 06:36:29 -07:00
errHyphenHyphenBang = “--!” found in comment.
2011-11-01 04:33:11 -07:00
errNcrZero = Character reference expands to zero.
2011-11-04 06:36:29 -07:00
errNoSpaceBetweenDoctypeSystemKeywordAndQuote = No space between the doctype “SYSTEM” keyword and the quote.
2011-11-01 04:33:11 -07:00
errNoSpaceBetweenPublicAndSystemIds = No space between the doctype public and system identifiers.
2011-11-04 06:36:29 -07:00
errNoSpaceBetweenDoctypePublicKeywordAndQuote = No space between the doctype “PUBLIC” keyword and the quote.
2011-11-01 04:33:11 -07:00
# Tree builder errors
2011-11-04 06:36:29 -07:00
errStrayStartTag2 = Stray start tag “%1$S”.
errStrayEndTag = Stray end tag “%1$S”.
errUnclosedElements = End tag “%1$S” seen, but there were open elements.
errUnclosedElementsImplied = End tag “%1$S” implied, but there were open elements.
2011-11-01 04:33:11 -07:00
errUnclosedElementsCell = A table cell was implicitly closed, but there were open elements.
errStrayDoctype = Stray doctype.
2011-11-04 06:36:29 -07:00
errAlmostStandardsDoctype = Almost standards mode doctype. Expected “<!DOCTYPE html>”.
errQuirkyDoctype = Quirky doctype. Expected “<!DOCTYPE html>”.
2011-11-01 04:33:11 -07:00
errNonSpaceInTrailer = Non-space character in page trailer.
2011-11-04 06:36:29 -07:00
errNonSpaceAfterFrameset = Non-space after “frameset”.
errNonSpaceInFrameset = Non-space in “frameset”.
2011-11-01 04:33:11 -07:00
errNonSpaceAfterBody = Non-space character after body.
2011-11-04 06:36:29 -07:00
errNonSpaceInColgroupInFragment = Non-space in “colgroup” when parsing fragment.
errNonSpaceInNoscriptInHead = Non-space character inside “noscript” inside “head”.
errFooBetweenHeadAndBody = “%1$S” element between “head” and “body”.
errStartTagWithoutDoctype = Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”.
errNoSelectInTableScope = No “select” in table scope.
errStartSelectWhereEndSelectExpected = “select” start tag where end tag expected.
errStartTagWithSelectOpen = “%1$S” start tag with “select” open.
2011-11-07 01:29:18 -08:00
errBadStartTagInHead2 = Bad start tag “%1$S” in “head”.
2011-11-04 06:36:29 -07:00
errImage = Saw a start tag “image”.
errIsindex = “isindex” seen.
errFooSeenWhenFooOpen = An “%1$S” start tag seen but an element of the same type was already open.
2011-11-01 04:33:11 -07:00
errHeadingWhenHeadingOpen = Heading cannot be a child of another heading.
2011-11-04 06:36:29 -07:00
errFramesetStart = “frameset” start tag seen.
2011-11-01 04:33:11 -07:00
errNoCellToClose = No cell to close.
2011-11-04 06:36:29 -07:00
errStartTagInTable = Start tag “%1$S” seen in “table”.
errFormWhenFormOpen = Saw a “form” start tag, but there was already an active “form” element. Nested forms are not allowed. Ignoring the tag.
errTableSeenWhileTableOpen = Start tag for “table” seen but the previous “table” is still open.
errStartTagInTableBody = “%1$S” start tag in table body.
errEndTagSeenWithoutDoctype = End tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”.
errEndTagAfterBody = Saw an end tag after “body” had been closed.
errEndTagSeenWithSelectOpen = “%1$S” end tag with “select” open.
errGarbageInColgroup = Garbage in “colgroup” fragment.
errEndTagBr = End tag “br”.
errNoElementToCloseButEndTagSeen = No “%1$S” element in scope but a “%1$S” end tag seen.
errHtmlStartTagInForeignContext = HTML start tag “%1$S” in a foreign namespace context.
errTableClosedWhileCaptionOpen = “table” closed but “caption” was still open.
2011-11-01 04:33:11 -07:00
errNoTableRowToClose = No table row to close.
2011-11-02 06:14:39 -07:00
errNonSpaceInTable = Misplaced non-space characters inside a table.
2011-11-04 06:36:29 -07:00
errUnclosedChildrenInRuby = Unclosed children in “ruby”.
errStartTagSeenWithoutRuby = Start tag “%1$S” seen without a “ruby” element being open.
errSelfClosing = Self-closing syntax (“/>”) used on a non-void HTML element. Ignoring the slash and treating as a start tag.
2011-11-01 04:33:11 -07:00
errNoCheckUnclosedElementsOnStack = Unclosed elements on stack.
2011-11-04 06:36:29 -07:00
errEndTagDidNotMatchCurrentOpenElement = End tag “%1$S” did not match the name of the current open element (“%2$S”).
errEndTagViolatesNestingRules = End tag “%1$S” violates nesting rules.