2
* Copyright 2010 Google Inc.
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
17
// Copyright 2006 Google Inc. All Rights Reserved.
18
// Author: mec@google.com (Michael Chastain)
19
// Author: dpeng@google.com (Daniel Peng)
21
#ifndef WEBUTIL_HTML_HTMLTAGENUM_H__
22
#define WEBUTIL_HTML_HTMLTAGENUM_H__
25
#include "string_using.h"
27
// This is public at the top level because I think a lot of people
28
// will want to use it.
30
// NOTE: These values may be stored in proto buffers. Do not change or remove
31
// any existing values. If you want to add support for a new tag, use the
32
// next available value (as specified by kHtmlTagBuiltinMax), and increment
33
// kHtmlTagBuiltinMax. Also make sure to add the new tag to HtmlTagEnumNames
36
// This tag list came from:
37
// http://www.w3.org/TR/REC-html40/index/elements.html
38
// With additional tags used in:
39
// repository/lexer/html_lexer.cc
40
// repository/parsers/base/handler-parser.cc
41
// And some additional legacy backwards-compatible tags from HTML5:
42
// http://whatwg.org/specs/web-apps/current-work/#stack
43
// [accessed 2006-10-10]
44
// Plus some Netscape Navigator 4.0 tags from:
45
// http://devedge-temp.mozilla.org/library/manuals/1998/htmlguide/
46
// [accessed 2006-11-21]
47
// The !doctype tag defines a reference to DTD (doctype type definition).
48
// It is a SGML tag and is somehow mentioned in the HTML 4.01 spec.
49
// http://www.w3.org/TR/html401/intro/sgmltut.html
50
// The noindex tag is a non-standard tag used mostly by Russian sites:
51
// http://ru.wikipedia.org/wiki/Noindex
52
// http://translate.google.com/translate?u=http://ru.wikipedia.org/wiki/Noindex&sl=ru&tl=en
53
// Added HTML5 tags, per 2011-01-13 working draft:
54
// http://www.w3.org/TR/html5/
57
// Unknown tag: must be 0
59
// From html 4.01 spec
71
kHtmlTagBlockquote = 12,
80
kHtmlTagColgroup = 21,
89
kHtmlTagFieldset = 30,
93
kHtmlTagFrameset = 34,
108
kHtmlTagIsindex = 49,
117
kHtmlTagNoframes = 58,
118
kHtmlTagNoscript = 59,
121
kHtmlTagOptgroup = 62,
141
kHtmlTagTextarea = 82,
152
kHtmlTagZeroLength = 92,
153
// Used in repository/lexer/html_lexer.cc
154
kHtmlTagBangDashDash = 93,
156
// Used in repository/parsers/base/handler-parser.cc
158
kHtmlTagMarquee = 96,
159
// Legacy backwards-compatible tags mentioned in HTML5.
162
kHtmlTagBgsound = 99,
164
kHtmlTagListing = 101,
165
kHtmlTagNoembed = 102,
166
kHtmlTagPlaintext = 103,
167
kHtmlTagSpacer = 104,
169
// From Netscape Navigator 4.0
170
kHtmlTagIlayer = 106,
171
kHtmlTagKeygen = 107,
173
kHtmlTagMulticol = 109,
174
kHtmlTagNolayer = 110,
175
kHtmlTagServer = 111,
176
// !doctype from SGML and also from HTML 4.01 spec.
177
kHtmlTagBangDoctype = 112,
178
// Legacy tag used mostly by Russian sites.
179
kHtmlTagNoindex = 113,
180
// Anything starts with ! (except those marked above) or ?
181
kHtmlTagBogusComment = 114,
182
// New tags in HTML5.
183
kHtmlTagArticle = 115,
187
kHtmlTagCanvas = 119,
188
kHtmlTagCommand = 120,
189
kHtmlTagDatalist = 121,
190
kHtmlTagDetails = 122,
191
kHtmlTagFigcaption = 123,
192
kHtmlTagFigure = 124,
193
kHtmlTagFooter = 125,
194
kHtmlTagHeader = 126,
195
kHtmlTagHgroup = 127,
199
kHtmlTagOutput = 131,
200
kHtmlTagProgress = 132,
204
kHtmlTagSection = 136,
205
kHtmlTagSource = 137,
206
kHtmlTagSummary = 138,
211
// Add new tag values here. Make sure you also add new tags to
212
// HtmlTagEnumNames in htmltagenum.cc and update kHtmlTagBuiltinMax.
215
kHtmlTagBuiltinMax = 142
218
// NULL if tag >= kHtmlTagBuiltinMax.
219
extern const char* HtmlTagName(HtmlTagEnum tag);
221
// StringPrintf("UNKNOWN%d", tag) if tag >= kHtmlTag
222
extern string HtmlTagNameOrUnknown(int i);
224
#endif // WEBUTIL_HTML_HTMLTAGENUM_H__