My dotfiles. Period.

html5.vim 33KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791
  1. " Vim completion for HTML5 data file
  2. " Language: HTML5
  3. " Maintainer: othree <othree@gmail.com>
  4. " Last Change: 2011 Apr 9
  5. " Lang Tag: {{{
  6. " Ref: http://www.iana.org/assignments/language-subtag-registry
  7. " Version: 2010/09/07
  8. " Description: only get two-letter language tag
  9. let lang_tag = [
  10. \ 'aa', 'ab', 'ae', 'af', 'ak', 'am', 'an', 'ar', 'as', 'av', 'ay', 'az', 'ba', 'be', 'bg', 'bh', 'bi', 'bm',
  11. \ 'bn', 'bo', 'br', 'bs', 'ca', 'ce', 'ch', 'co', 'cr', 'cs', 'cu', 'cv', 'cy', 'da', 'de', 'dv', 'dz', 'ee',
  12. \ 'el', 'en', 'eo', 'es', 'et', 'eu', 'fa', 'ff', 'fi', 'fj', 'fo', 'fr', 'fy', 'ga', 'gd', 'gl', 'gn', 'gu',
  13. \ 'gv', 'ha', 'he', 'hi', 'ho', 'hr', 'ht', 'hu', 'hy', 'hz', 'ia', 'id', 'ie', 'ig', 'ii', 'ik', 'in', 'io',
  14. \ 'is', 'it', 'iu', 'iw', 'ja', 'ji', 'jv', 'jw', 'ka', 'kg', 'ki', 'kj', 'kk', 'kl', 'km', 'kn', 'ko', 'kr',
  15. \ 'ks', 'ku', 'kv', 'kw', 'ky', 'la', 'lb', 'lg', 'li', 'ln', 'lo', 'lt', 'lu', 'lv', 'mg', 'mh', 'mi', 'mk',
  16. \ 'ml', 'mn', 'mo', 'mr', 'ms', 'mt', 'my', 'na', 'nb', 'nd', 'ne', 'ng', 'nl', 'nn', 'no', 'nr', 'nv', 'ny',
  17. \ 'oc', 'oj', 'om', 'or', 'os', 'pa', 'pi', 'pl', 'ps', 'pt', 'qu', 'rm', 'rn', 'ro', 'ru', 'rw', 'sa', 'sc',
  18. \ 'sd', 'se', 'sg', 'sh', 'si', 'sk', 'sl', 'sm', 'sn', 'so', 'sq', 'sr', 'ss', 'st', 'su', 'sv', 'sw', 'ta',
  19. \ 'te', 'tg', 'th', 'ti', 'tk', 'tl', 'tn', 'to', 'tr', 'ts', 'tt', 'tw', 'ty', 'ug', 'uk', 'ur', 'uz', 've',
  20. \ 'vi', 'vo', 'wa', 'wo', 'xh', 'yi', 'yo', 'za', 'zh', 'zu', 'zh-CN', 'zh-TW']
  21. " }}}
  22. " Charset: {{{
  23. " Ref: http://www.iana.org/assignments/character-sets
  24. " Version: 2010/09/07
  25. let charset = [
  26. \ 'ANSI_X3.4-1968', 'ISO_8859-1:1987', 'ISO_8859-2:1987', 'ISO_8859-3:1988', 'ISO_8859-4:1988', 'ISO_8859-5:1988',
  27. \ 'ISO_8859-6:1987', 'ISO_8859-7:1987', 'ISO_8859-8:1988', 'ISO_8859-9:1989', 'ISO-8859-10', 'ISO_6937-2-add', 'JIS_X0201',
  28. \ 'JIS_Encoding', 'Shift_JIS', 'Extended_UNIX_Code_Packed_Format_for_Japanese', 'Extended_UNIX_Code_Fixed_Width_for_Japanese',
  29. \ 'BS_4730', 'SEN_850200_C', 'IT', 'ES', 'DIN_66003', 'NS_4551-1', 'NF_Z_62-010', 'ISO-10646-UTF-1', 'ISO_646.basic:1983',
  30. \ 'INVARIANT', 'ISO_646.irv:1983', 'NATS-SEFI', 'NATS-SEFI-ADD', 'NATS-DANO', 'NATS-DANO-ADD', 'SEN_850200_B', 'KS_C_5601-1987',
  31. \ 'ISO-2022-KR', 'EUC-KR', 'ISO-2022-JP', 'ISO-2022-JP-2', 'JIS_C6220-1969-jp', 'JIS_C6220-1969-ro', 'PT', 'greek7-old',
  32. \ 'latin-greek', 'NF_Z_62-010_(1973)', 'Latin-greek-1', 'ISO_5427', 'JIS_C6226-1978', 'BS_viewdata', 'INIS', 'INIS-8',
  33. \ 'INIS-cyrillic', 'ISO_5427:1981', 'ISO_5428:1980', 'GB_1988-80', 'GB_2312-80', 'NS_4551-2', 'videotex-suppl', 'PT2',
  34. \ 'ES2', 'MSZ_7795.3', 'JIS_C6226-1983', 'greek7', 'ASMO_449', 'iso-ir-90', 'JIS_C6229-1984-a', 'JIS_C6229-1984-b',
  35. \ 'JIS_C6229-1984-b-add', 'JIS_C6229-1984-hand', 'JIS_C6229-1984-hand-add', 'JIS_C6229-1984-kana', 'ISO_2033-1983',
  36. \ 'ANSI_X3.110-1983', 'T.61-7bit', 'T.61-8bit', 'ECMA-cyrillic', 'CSA_Z243.4-1985-1', 'CSA_Z243.4-1985-2', 'CSA_Z243.4-1985-gr',
  37. \ 'ISO_8859-6-E', 'ISO_8859-6-I', 'T.101-G2', 'ISO_8859-8-E', 'ISO_8859-8-I', 'CSN_369103', 'JUS_I.B1.002', 'IEC_P27-1',
  38. \ 'JUS_I.B1.003-serb', 'JUS_I.B1.003-mac', 'greek-ccitt', 'NC_NC00-10:81', 'ISO_6937-2-25', 'GOST_19768-74', 'ISO_8859-supp',
  39. \ 'ISO_10367-box', 'latin-lap', 'JIS_X0212-1990', 'DS_2089', 'us-dk', 'dk-us', 'KSC5636', 'UNICODE-1-1-UTF-7', 'ISO-2022-CN',
  40. \ 'ISO-2022-CN-EXT', 'UTF-8', 'ISO-8859-13', 'ISO-8859-14', 'ISO-8859-15', 'ISO-8859-16', 'GBK', 'GB18030', 'OSD_EBCDIC_DF04_15',
  41. \ 'OSD_EBCDIC_DF03_IRV', 'OSD_EBCDIC_DF04_1', 'ISO-11548-1', 'KZ-1048', 'ISO-10646-UCS-2', 'ISO-10646-UCS-4', 'ISO-10646-UCS-Basic',
  42. \ 'ISO-10646-Unicode-Latin1', 'ISO-10646-J-1', 'ISO-Unicode-IBM-1261', 'ISO-Unicode-IBM-1268', 'ISO-Unicode-IBM-1276',
  43. \ 'ISO-Unicode-IBM-1264', 'ISO-Unicode-IBM-1265', 'UNICODE-1-1', 'SCSU', 'UTF-7', 'UTF-16BE', 'UTF-16LE', 'UTF-16', 'CESU-8',
  44. \ 'UTF-32', 'UTF-32BE', 'UTF-32LE', 'BOCU-1', 'ISO-8859-1-Windows-3.0-Latin-1', 'ISO-8859-1-Windows-3.1-Latin-1',
  45. \ 'ISO-8859-2-Windows-Latin-2', 'ISO-8859-9-Windows-Latin-5', 'hp-roman8', 'Adobe-Standard-Encoding', 'Ventura-US',
  46. \ 'Ventura-International', 'DEC-MCS', 'IBM850', 'PC8-Danish-Norwegian', 'IBM862', 'PC8-Turkish', 'IBM-Symbols', 'IBM-Thai',
  47. \ 'HP-Legal', 'HP-Pi-font', 'HP-Math8', 'Adobe-Symbol-Encoding', 'HP-DeskTop', 'Ventura-Math', 'Microsoft-Publishing',
  48. \ 'Windows-31J', 'GB2312', 'Big5', 'macintosh', 'IBM037', 'IBM038', 'IBM273', 'IBM274', 'IBM275', 'IBM277', 'IBM278',
  49. \ 'IBM280', 'IBM281', 'IBM284', 'IBM285', 'IBM290', 'IBM297', 'IBM420', 'IBM423', 'IBM424', 'IBM437', 'IBM500', 'IBM851',
  50. \ 'IBM852', 'IBM855', 'IBM857', 'IBM860', 'IBM861', 'IBM863', 'IBM864', 'IBM865', 'IBM868', 'IBM869', 'IBM870', 'IBM871',
  51. \ 'IBM880', 'IBM891', 'IBM903', 'IBM904', 'IBM905', 'IBM918', 'IBM1026', 'EBCDIC-AT-DE', 'EBCDIC-AT-DE-A', 'EBCDIC-CA-FR',
  52. \ 'EBCDIC-DK-NO', 'EBCDIC-DK-NO-A', 'EBCDIC-FI-SE', 'EBCDIC-FI-SE-A', 'EBCDIC-FR', 'EBCDIC-IT', 'EBCDIC-PT', 'EBCDIC-ES',
  53. \ 'EBCDIC-ES-A', 'EBCDIC-ES-S', 'EBCDIC-UK', 'EBCDIC-US', 'UNKNOWN-8BIT', 'MNEMONIC', 'MNEM', 'VISCII', 'VIQR', 'KOI8-R',
  54. \ 'HZ-GB-2312', 'IBM866', 'IBM775', 'KOI8-U', 'IBM00858', 'IBM00924', 'IBM01140', 'IBM01141', 'IBM01142', 'IBM01143',
  55. \ 'IBM01144', 'IBM01145', 'IBM01146', 'IBM01147', 'IBM01148', 'IBM01149', 'Big5-HKSCS', 'IBM1047', 'PTCP154', 'Amiga-1251',
  56. \ 'KOI7-switched', 'BRF', 'TSCII', 'windows-1250', 'windows-1251', 'windows-1252', 'windows-1253', 'windows-1254', 'windows-1255',
  57. \ 'windows-1256', 'windows-1257', 'windows-1258', 'TIS-620', ]
  58. " }}}
  59. " Attributes_and_Settings: {{{
  60. let core_attributes = {'accesskey': [], 'class': [], 'contenteditable': ['true', 'false', ''], 'contextmenu': [], 'dir': ['ltr', 'rtl'], 'draggable': ['true', 'false'], 'hidden': ['hidden', ''], 'id': [], 'lang': lang_tag, 'spellcheck': ['true', 'false', ''], 'style': [], 'tabindex': [], 'title': []}
  61. let xml_attributes = {'xml:lang': lang_tag, 'xml:space': ['preserve'], 'xml:base': [], 'xmlns': ['http://www.w3.org/1999/xhtml', 'http://www.w3.org/1998/Math/MathML', 'http://www.w3.org/2000/svg', 'http://www.w3.org/1999/xlink']}
  62. let body_attributes = {}
  63. let global_attributes = extend(core_attributes, xml_attributes)
  64. if !exists('g:html5_event_handler_attributes_complete')
  65. let g:html5_event_handler_attributes_complete = 1
  66. endif
  67. " http://dev.w3.org/html5/spec/Overview.html#attributes-1
  68. let attributes_value = {
  69. \ 'accept': ['MIME', ''],
  70. \ 'accept-charset': ['Charset', ''],
  71. \ 'accesskey': ['Character', ''],
  72. \ 'action': ['URL', ''],
  73. \ 'alt': ['Text', ''],
  74. \ 'async': ['Bool', ''],
  75. \ 'autocomplete': ['on/off', ''],
  76. \ 'autofocus': ['Bool', ''],
  77. \ 'autoplay': ['Bool', ''],
  78. \ 'border': ['1', ''],
  79. \ 'challenge': ['Text', ''],
  80. \ 'charset': ['Charset', ''],
  81. \ 'checked': ['Bool', ''],
  82. \ 'cite': ['URL', ''],
  83. \ 'class': ['*Token', ''],
  84. \ 'cols': ['Int', ''],
  85. \ 'colspan': ['Int', ''],
  86. \ 'content': ['Text', ''],
  87. \ 'contenteditable': ['true/false', ''],
  88. \ 'contextmenu': ['ID', ''],
  89. \ 'controls': ['Bool', ''],
  90. \ 'coords': ['*Int', ''],
  91. \ 'data': ['URL', ''],
  92. \ 'datetime': ['Datetime', ''],
  93. \ 'defer': ['Bool', ''],
  94. \ 'dir': ['ltr/rtl', ''],
  95. \ 'disabled': ['Bool', ''],
  96. \ 'draggable': ['true/false', ''],
  97. \ 'enctype': ['Token', ''],
  98. \ 'for': ['ID', ''],
  99. \ 'form': ['ID', ''],
  100. \ 'formaction': ['URL', ''],
  101. \ 'formenctype': ['Token', ''],
  102. \ 'formmethod': ['HTTP Method', ''],
  103. \ 'formnovalidate': ['Bool', ''],
  104. \ 'formtarget': ['Name', ''],
  105. \ 'headers': ['*ID', ''],
  106. \ 'height': ['Int', ''],
  107. \ 'hidden': ['Bool', ''],
  108. \ 'high': ['Number', ''],
  109. \ 'href': ['URL', ''],
  110. \ 'hreflang': ['Lang Tag', ''],
  111. \ 'http-equiv': ['Text', ''],
  112. \ 'icon': ['URL', ''],
  113. \ 'id': ['Text', ''],
  114. \ 'ismap': ['Bool', ''],
  115. \ 'keytype': ['Text', ''],
  116. \ 'label': ['Text', ''],
  117. \ 'lang': ['Lang Tag', ''],
  118. \ 'list': ['ID', ''],
  119. \ 'loop': ['Bool', ''],
  120. \ 'low': ['Number', ''],
  121. \ 'manifest': ['URL', ''],
  122. \ 'max': ['Number', ''],
  123. \ 'maxlength': ['Int', ''],
  124. \ 'media': ['Text', ''],
  125. \ 'method': ['HTTP Method', ''],
  126. \ 'min': ['Number', ''],
  127. \ 'multiple': ['Bool', ''],
  128. \ 'name': ['Text', ''],
  129. \ 'novalidate': ['Bool', ''],
  130. \ 'open': ['Bool', ''],
  131. \ 'optimum': ['Number', ''],
  132. \ 'pattern': ['Pattern', ''],
  133. \ 'placeholder': ['Text', ''],
  134. \ 'poster': ['URL', ''],
  135. \ 'preload': ['Token', ''],
  136. \ 'pubdate': ['Bool', ''],
  137. \ 'radiogroup': ['Text', ''],
  138. \ 'readonly': ['Bool', ''],
  139. \ 'rel': ['*Token', ''],
  140. \ 'required': ['Bool', ''],
  141. \ 'reversed': ['Bool', ''],
  142. \ 'rows': ['Int', ''],
  143. \ 'rowspan': ['Int', ''],
  144. \ 'sandbox': ['*Token', ''],
  145. \ 'spellcheck': ['true/false', ''],
  146. \ 'scope': ['Token', ''],
  147. \ 'scoped': ['Bool', ''],
  148. \ 'seamless': ['Bool', ''],
  149. \ 'selected': ['Bool', ''],
  150. \ 'shape': ['Token', ''],
  151. \ 'size': ['Int', ''],
  152. \ 'sizes': ['*Token', ''],
  153. \ 'span': ['Int', ''],
  154. \ 'src': ['Int', ''],
  155. \ 'srcdoc': ['Document', ''],
  156. \ 'start': ['Int', ''],
  157. \ 'step': ['Int', ''],
  158. \ 'style': ['Style', ''],
  159. \ 'summary': ['Text', ''],
  160. \ 'tabindex': ['Int', ''],
  161. \ 'target': ['Name', ''],
  162. \ 'title': ['Text', ''],
  163. \ 'type': ['Token', ''],
  164. \ 'usemap': ['Name', ''],
  165. \ 'value': ['Text', ''],
  166. \ 'width': ['Int', ''],
  167. \ 'wrap': ['soft/hard', ''],
  168. \ 'xml:lang': ['Lang tag', ''],
  169. \ 'xml:base': ['*URI', ''],
  170. \ 'xml:space': ['preserve', ''],
  171. \ 'xmlns': ['URI', ''],
  172. \ 'version': ['HTML+RDFa 1.1', ''],
  173. \ 'role': ['*Token', '']
  174. \ }
  175. if g:html5_event_handler_attributes_complete == 1
  176. let event_handler_attributes = {'onabort': [], 'onblur': [], 'oncanplay': [], 'oncanplaythrough': [], 'onchange': [], 'onclick': [], 'oncontextmenu': [], 'ondblclick': [], 'ondrag': [], 'ondragend': [], 'ondragenter': [], 'ondragleave': [], 'ondragover': [], 'ondragstart': [], 'ondrop': [], 'ondurationchange': [], 'onemptied': [], 'onended': [], 'onerror': [], 'onfocus': [], 'onformchange': [], 'onforminput': [], 'oninput': [], 'oninvalid': [], 'onkeydown': [], 'onkeypress': [], 'onkeyup': [], 'onload': [], 'onloadeddata': [], 'onloadedmetadata': [], 'onloadstart': [], 'onmousedown': [], 'onmousemove': [], 'onmouseout': [], 'onmouseover': [], 'onmouseup': [], 'onmousewheel': [], 'onpause': [], 'onplay': [], 'onplaying': [], 'onprogress': [], 'onratechange': [], 'onreadystatechange': [], 'onscroll': [], 'onseeked': [], 'onseeking': [], 'onselect': [], 'onshow': [], 'onstalled': [], 'onsubmit': [], 'onsuspend': [], 'ontimeupdate': [], 'onvolumechange': [], 'onwaiting': []}
  177. let global_attributes = extend(global_attributes, event_handler_attributes)
  178. let body_attributes = {'onafterprint': [], 'onbeforeprint': [], 'onbeforeunload': [], 'onblur': [], 'onerror': [], 'onfocus': [], 'onhashchange': [], 'onload': [], 'onmessage': [], 'onoffline': [], 'ononline': [], 'onpopstate': [], 'onredo': [], 'onresize': [], 'onstorage': [], 'onundo': [], 'onunload': []}
  179. let event_attributes_value = {
  180. \ 'onabort': ['Script', ''],
  181. \ 'onafterprint': ['Script', ''],
  182. \ 'onbeforeprint': ['Script', ''],
  183. \ 'onbeforeunload': ['Script', ''],
  184. \ 'onblur': ['Script', ''],
  185. \ 'oncanplay': ['Script', ''],
  186. \ 'oncanplaythrough': ['Script', ''],
  187. \ 'onchange': ['Script', ''],
  188. \ 'onclick': ['Script', ''],
  189. \ 'oncontextmenu': ['Script', ''],
  190. \ 'ondblclick': ['Script', ''],
  191. \ 'ondrag': ['Script', ''],
  192. \ 'ondragend': ['Script', ''],
  193. \ 'ondragenter': ['Script', ''],
  194. \ 'ondragleave': ['Script', ''],
  195. \ 'ondragover': ['Script', ''],
  196. \ 'ondragstart': ['Script', ''],
  197. \ 'ondrop': ['Script', ''],
  198. \ 'ondurationchange': ['Script', ''],
  199. \ 'onemptied': ['Script', ''],
  200. \ 'onended': ['Script', ''],
  201. \ 'onerror': ['Script', ''],
  202. \ 'onfocus': ['Script', ''],
  203. \ 'onformchange': ['Script', ''],
  204. \ 'onforminput': ['Script', ''],
  205. \ 'onhashchange': ['Script', ''],
  206. \ 'oninput': ['Script', ''],
  207. \ 'oninvalid': ['Script', ''],
  208. \ 'onkeydown': ['Script', ''],
  209. \ 'onkeypress': ['Script', ''],
  210. \ 'onkeyup': ['Script', ''],
  211. \ 'onload': ['Script', ''],
  212. \ 'onloadeddata': ['Script', ''],
  213. \ 'onloadedmetadata': ['Script', ''],
  214. \ 'onloadstart': ['Script', ''],
  215. \ 'onmessage': ['Script', ''],
  216. \ 'onmousedown': ['Script', ''],
  217. \ 'onmousemove': ['Script', ''],
  218. \ 'onmouseout': ['Script', ''],
  219. \ 'onmouseover': ['Script', ''],
  220. \ 'onmouseup': ['Script', ''],
  221. \ 'onmousewheel': ['Script', ''],
  222. \ 'onoffline': ['Script', ''],
  223. \ 'ononline': ['Script', ''],
  224. \ 'onpagehide': ['Script', ''],
  225. \ 'onpageshow': ['Script', ''],
  226. \ 'onpause': ['Script', ''],
  227. \ 'onplay': ['Script', ''],
  228. \ 'onplaying': ['Script', ''],
  229. \ 'onpopstate': ['Script', ''],
  230. \ 'onprogress': ['Script', ''],
  231. \ 'onratechange': ['Script', ''],
  232. \ 'onreadystatechange': ['Script', ''],
  233. \ 'onredo': ['Script', ''],
  234. \ 'onresize': ['Script', ''],
  235. \ 'onscroll': ['Script', ''],
  236. \ 'onseeked': ['Script', ''],
  237. \ 'onseeking': ['Script', ''],
  238. \ 'onselect': ['Script', ''],
  239. \ 'onshow': ['Script', ''],
  240. \ 'onstalled': ['Script', ''],
  241. \ 'onstorage': ['Script', ''],
  242. \ 'onsubmit': ['Script', ''],
  243. \ 'onsuspend': ['Script', ''],
  244. \ 'ontimeupdate': ['Script', ''],
  245. \ 'onundo': ['Script', ''],
  246. \ 'onunload': ['Script', ''],
  247. \ 'onvolumechange': ['Script', ''],
  248. \ 'onwaiting': ['Script', '']
  249. \ }
  250. let attributes_value = extend(attributes_value, event_attributes_value)
  251. endif
  252. if !exists('g:html5_rdfa_attributes_complete')
  253. let g:html5_rdfa_attributes_complete = 1
  254. endif
  255. if g:html5_rdfa_attributes_complete == 1
  256. " http://www.w3.org/TR/rdfa-syntax/#s_metaAttributes
  257. " http://www.w3.org/TR/rdfa-core/#s_syntax
  258. let relrev = ['chapter', 'contents', 'copyright', 'first', 'glossary', 'help', 'icon', 'index', 'last', 'license', 'meta', 'next', 'p3pv1', 'prev', 'role', 'section', 'stylesheet', 'subsection', 'start', 'top', 'up']
  259. let rdfa_attributes = {'about': [], 'content': [], 'datatype': [], 'prefix': [], 'profile': [], 'property': [], 'resource': [], 'rel': relrev, 'rev': relrev, 'typeof': [], 'vocab': []}
  260. let global_attributes = extend(global_attributes, rdfa_attributes)
  261. let rdfa_attributes_value = {
  262. \ 'about': ['SafeCURIEorCURIEorURI', ''],
  263. \ 'content': ['CDATA String', ''],
  264. \ 'datatype': ['CURIE', ''],
  265. \ 'prefix': ['*Prefix', ''],
  266. \ 'profile': ['String', ''],
  267. \ 'property': ['*TERMorCURIEorAbsURIs', ''],
  268. \ 'resource': ['URIorSafeCURIE', ''],
  269. \ 'rel': ['*TERMorCURIEorAbsURIs', ''],
  270. \ 'rev': ['*TERMorCURIEorAbsURIs', ''],
  271. \ 'typeof': ['*TERMorCURIEorAbsURIs', ''],
  272. \ 'vocab': ['URI', '']
  273. \ }
  274. let attributes_value = extend(attributes_value, rdfa_attributes_value)
  275. endif
  276. if !exists('g:html5_microdata_attributes_complete')
  277. let g:html5_microdata_attributes_complete = 1
  278. endif
  279. if g:html5_microdata_attributes_complete == 1
  280. let microdata_attributes = {'itemid': [], 'itemscope': ['itemscope', ''], 'itemtype': [], 'itemprop': [], 'itemref': []}
  281. let global_attributes = extend(global_attributes, microdata_attributes)
  282. let microdata_attributes_value = {
  283. \ 'itemid': ['URI', ''],
  284. \ 'itemscope': ['Bool', ''],
  285. \ 'itemtype': ['URI', ''],
  286. \ 'itemprop': ['String', ''],
  287. \ 'itemref': ['*ID', '']
  288. \ }
  289. let attributes_value = extend(attributes_value, microdata_attributes_value)
  290. endif
  291. " }}}
  292. " WAI_ARIA: {{{
  293. " Ref: http://www.w3.org/TR/wai-aria/
  294. " Version: Draft 15 December 2009
  295. if !exists('g:html5_aria_attributes_complete')
  296. let g:html5_aria_attributes_complete = 1
  297. endif
  298. if g:html5_aria_attributes_complete == 1
  299. " Ref: http://www.w3.org/TR/wai-aria/roles
  300. " Version: Draft 15 December 2009
  301. let widget_role = ['alert', 'alertdialog', 'button', 'checkbox', 'combobox', 'dialog', 'gridcell', 'link', 'log', 'marquee', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'radio', 'radiogroup', 'scrollbar', 'slider', 'spinbutton', 'status', 'tab', 'tabpanel', 'textbox', 'timer', 'tooltip', 'treeitem', 'combobox', 'grid', 'listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid']
  302. let document_structure = ['article', 'columnheader', 'definition', 'directory', 'document', 'group', 'heading', 'img', 'list', 'listitem', 'math', 'note', 'presentation', 'region', 'row', 'rowheader', 'separator']
  303. let landmark_role = ['application', 'banner', 'complementary', 'contentinfo', 'form', 'main', 'navigation', 'search']
  304. let role = extend(widget_role, document_structure)
  305. let role = extend(role, landmark_role)
  306. let global_attributes = extend(global_attributes, {'role': role})
  307. endif
  308. " }}}
  309. " Ref: http://dev.w3.org/html5/markup/
  310. " Version: Draft 05 April 2011
  311. let phrasing_elements = ['a', 'em', 'strong', 'small', 'mark', 'abbr', 'dfn', 'i', 'b', 'u', 'code', 'var', 'samp', 'kbd', 'sup', 'sub', 'q', 'cite', 'span', 'bdo', 'bdi', 'br', 'wbr', 'ins', 'del', 'img', 'embed', 'object', 'iframe', 'map', 'area', 'script', 'noscript', 'ruby', 'video', 'audio', 'input', 'textarea', 'select', 'button', 'label', 'output', 'datalist', 'keygen', 'progress', 'command', 'canvas', 'time', 'meter']
  312. let metadata_elements = ['link', 'style', 'meta', 'script', 'noscript', 'command']
  313. let flow_elements = phrasing_elements + ['p', 'hr', 'pre', 'ul', 'ol', 'dl', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hgroup', 'address', 'blockquote', 'ins', 'del', 'object', 'map', 'noscript', 'section', 'nav', 'article', 'aside', 'header', 'footer', 'video', 'audio', 'figure', 'table', 'form', 'fieldset', 'menu', 'canvas', 'details']
  314. " http://dev.w3.org/html5/spec/Overview.html#linkTypes
  315. let linktypes = ['alternate', 'author', 'bookmark', 'external', 'help', 'icon', 'license', 'next', 'nofollow', 'noreferrer', 'pingback', 'prefetch', 'prev', 'search', 'stylesheet', 'sidebar', 'tag']
  316. " http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html
  317. let linkreltypes = linktypes + ['canonical']
  318. " a and button are special elements for interactive, some element can't be its descendent
  319. let abutton_dec = 'details\\|embed\\|iframe\\|keygen\\|label\\|menu\\|select\\|textarea'
  320. let g:xmldata_html5 = {
  321. \ 'vimxmlentities': ['AElig', 'Aacute', 'Acirc', 'Agrave', 'Alpha', 'Aring', 'Atilde', 'Auml', 'Beta', 'Ccedil', 'Chi', 'Dagger', 'Delta', 'ETH', 'Eacute', 'Ecirc', 'Egrave', 'Epsilon', 'Eta', 'Euml', 'Gamma', 'Iacute', 'Icirc', 'Igrave', 'Iota', 'Iuml', 'Kappa', 'Lambda', 'Mu', 'Ntilde', 'Nu', 'OElig', 'Oacute', 'Ocirc', 'Ograve', 'Omega', 'Omicron', 'Oslash', 'Otilde', 'Ouml', 'Phi', 'Pi', 'Prime', 'Psi', 'Rho', 'Scaron', 'Sigma', 'THORN', 'Tau', 'Theta', 'Uacute', 'Ucirc', 'Ugrave', 'Upsilon', 'Uuml', 'Xi', 'Yacute', 'Yuml', 'Zeta', 'aacute', 'acirc', 'acute', 'aelig', 'agrave', 'alefsym', 'alpha', 'amp', 'and', 'ang', 'apos', 'aring', 'asymp', 'atilde', 'auml', 'bdquo', 'beta', 'brvbar', 'bull', 'cap', 'ccedil', 'cedil', 'cent', 'chi', 'circ', 'clubs', 'cong', 'copy', 'crarr', 'cup', 'curren', 'dArr', 'dagger', 'darr', 'deg', 'delta', 'diams', 'divide', 'eacute', 'ecirc', 'egrave', 'empty', 'emsp', 'ensp', 'epsilon', 'equiv', 'eta', 'eth', 'euml', 'euro', 'exist', 'fnof', 'forall', 'frac12', 'frac14', 'frac34', 'frasl', 'gamma', 'ge', 'gt', 'hArr', 'harr', 'hearts', 'hellip', 'iacute', 'icirc', 'iexcl', 'igrave', 'image', 'infin', 'int', 'iota', 'iquest', 'isin', 'iuml', 'kappa', 'lArr', 'lambda', 'lang', 'laquo', 'larr', 'lceil', 'ldquo', 'le', 'lfloor', 'lowast', 'loz', 'lrm', 'lsaquo', 'lsquo', 'lt', 'macr', 'mdash', 'micro', 'middot', 'minus', 'mu', 'nabla', 'nbsp', 'ndash', 'ne', 'ni', 'not', 'notin', 'nsub', 'ntilde', 'nu', 'oacute', 'ocirc', 'oelig', 'ograve', 'oline', 'omega', 'omicron', 'oplus', 'or', 'ordf', 'ordm', 'oslash', 'otilde', 'otimes', 'ouml', 'para', 'part', 'permil', 'perp', 'phi', 'pi', 'piv', 'plusmn', 'pound', 'prime', 'prod', 'prop', 'psi', 'quot', 'rArr', 'radic', 'rang', 'raquo', 'rarr', 'rceil', 'rdquo', 'real', 'reg', 'rfloor', 'rho', 'rlm', 'rsaquo', 'rsquo', 'sbquo', 'scaron', 'sdot', 'sect', 'shy', 'sigma', 'sigmaf', 'sim', 'spades', 'sub', 'sube', 'sum', 'sup', 'sup1', 'sup2', 'sup3', 'supe', 'szlig', 'tau', 'there4', 'theta', 'thetasym', 'thinsp', 'thorn', 'tilde', 'times', 'trade', 'uArr', 'uacute', 'uarr', 'ucirc', 'ugrave', 'uml', 'upsih', 'upsilon', 'uuml', 'weierp', 'xi', 'yacute', 'yen', 'yuml', 'zeta', 'zwj', 'zwnj'],
  322. \ 'vimxmlroot': ['html'],
  323. \ 'a': [
  324. \ filter(copy(flow_elements), "!(v:val =~ '". abutton_dec ."')"),
  325. \ extend(copy(global_attributes), {'name': [], 'href': [], 'target': [], 'rel': linktypes, 'hreflang': lang_tag, 'media': [], 'type': []})
  326. \ ],
  327. \ 'abbr': [
  328. \ phrasing_elements,
  329. \ global_attributes
  330. \ ],
  331. \ 'address': [
  332. \ filter(copy(flow_elements), "!(v:val =~ 'address\\|nav\\|article\\|header\\|footer\\|section\\|aside\\|h1\\|h2\\|h3\\|h4\\|h5\\|h6')"),
  333. \ global_attributes
  334. \ ],
  335. \ 'area': [
  336. \ [],
  337. \ extend(copy(global_attributes), {'alt': [], 'href': [], 'target': [], 'rel': linktypes, 'media': [], 'hreflang': lang_tag, 'type': [], 'shape': ['rect', 'circle', 'poly', 'default'], 'coords': []})
  338. \ ],
  339. \ 'article': [
  340. \ flow_elements + ['style'],
  341. \ global_attributes
  342. \ ],
  343. \ 'aside': [
  344. \ flow_elements + ['style'],
  345. \ global_attributes
  346. \ ],
  347. \ 'audio': [
  348. \ flow_elements + ['source', 'track'],
  349. \ extend(copy(global_attributes), {'autoplay': ['autoplay', ''], 'preload': ['none', 'metadata', 'auto', ''], 'controls': ['controls', ''], 'loop': ['loop', ''], 'src': []})
  350. \ ],
  351. \ 'b': [
  352. \ phrasing_elements,
  353. \ global_attributes
  354. \ ],
  355. \ 'base': [
  356. \ [],
  357. \ extend(copy(global_attributes), {'href': [], 'target': []})
  358. \ ],
  359. \ 'bdo': [
  360. \ phrasing_elements,
  361. \ global_attributes
  362. \ ],
  363. \ 'bdi': [
  364. \ phrasing_elements,
  365. \ global_attributes
  366. \ ],
  367. \ 'blockquote': [
  368. \ flow_elements,
  369. \ extend(copy(global_attributes), {'cite': []})
  370. \ ],
  371. \ 'body': [
  372. \ flow_elements,
  373. \ extend(copy(global_attributes), body_attributes)
  374. \ ],
  375. \ 'br': [
  376. \ [],
  377. \ global_attributes
  378. \ ],
  379. \ 'button': [
  380. \ filter(copy(phrasing_elements), "!(v:val =~ '". abutton_dec ."')"),
  381. \ extend(copy(global_attributes), {'type': ['submit', 'reset', 'button'], 'name': [], 'disabled': ['disabled', ''], 'form': [], 'value': [], 'formaction': [], 'autofocus': ['autofocus', ''], 'formenctype': ['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'], 'formmethod': ['get', 'post', 'put', 'delete'], 'formtarget': [], 'formnovalidate': ['formnovalidate', '']})
  382. \ ],
  383. \ 'canvas': [
  384. \ flow_elements,
  385. \ extend(copy(global_attributes), {'height': [], 'width': []})
  386. \ ],
  387. \ 'caption': [
  388. \ filter(copy(flow_elements), "!(v:val =~ 'table')"),
  389. \ global_attributes
  390. \ ],
  391. \ 'cite': [
  392. \ phrasing_elements,
  393. \ global_attributes
  394. \ ],
  395. \ 'code': [
  396. \ phrasing_elements,
  397. \ global_attributes
  398. \ ],
  399. \ 'col': [
  400. \ [],
  401. \ extend(copy(global_attributes), {'span': []})
  402. \ ],
  403. \ 'colgroup': [
  404. \ [],
  405. \ extend(copy(global_attributes), {'span': []})
  406. \ ],
  407. \ 'command': [
  408. \ ['col'],
  409. \ extend(copy(global_attributes), {'type': ['command', 'radio', 'checkbox'], 'radiogroup': [], 'checked': ['checked', ''], 'label': [], 'icon': [], 'disabled': ['disabled', '']})
  410. \ ],
  411. \ 'datalist': [
  412. \ phrasing_elements + ['option'],
  413. \ global_attributes
  414. \ ],
  415. \ 'dd': [
  416. \ flow_elements,
  417. \ global_attributes
  418. \ ],
  419. \ 'del': [
  420. \ flow_elements,
  421. \ extend(copy(global_attributes), {'cite': [], 'datetime': []})
  422. \ ],
  423. \ 'details': [
  424. \ flow_elements + ['summary'],
  425. \ extend(copy(global_attributes), {'open': ['open', '']})
  426. \ ],
  427. \ 'dfn': [
  428. \ filter(copy(phrasing_elements), "!(v:val =~ 'dfn')"),
  429. \ global_attributes
  430. \ ],
  431. \ 'div': [
  432. \ flow_elements + ['style'],
  433. \ global_attributes
  434. \ ],
  435. \ 'dl': [
  436. \ ['dt', 'dd'],
  437. \ global_attributes
  438. \ ],
  439. \ 'dt': [
  440. \ phrasing_elements,
  441. \ global_attributes
  442. \ ],
  443. \ 'em': [
  444. \ phrasing_elements,
  445. \ global_attributes
  446. \ ],
  447. \ 'embed': [
  448. \ [],
  449. \ extend(copy(global_attributes), {'src': [], 'type': [], 'height': [], 'width': []})
  450. \ ],
  451. \ 'fieldset': [
  452. \ flow_elements + ['legend'],
  453. \ extend(copy(global_attributes), {'name': [], 'disabled': ['disabled', ''], 'form': []})
  454. \ ],
  455. \ 'figcaption': [
  456. \ flow_elements,
  457. \ global_attributes
  458. \ ],
  459. \ 'figure': [
  460. \ flow_elements + ['figcaption'],
  461. \ global_attributes
  462. \ ],
  463. \ 'footer': [
  464. \ filter(copy(flow_elements), "!(v:val =~ 'address\\|header\\|footer')"),
  465. \ global_attributes
  466. \ ],
  467. \ 'form': [
  468. \ flow_elements,
  469. \ extend(copy(global_attributes), {'name': [], 'action': [], 'enctype': ['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'], 'method': ['get', 'post', 'put', 'delete'], 'target': [], 'novalidate': ['novalidate', ''], 'accept-charset': charset, 'autocomplete': ['on', 'off']})
  470. \ ],
  471. \ 'h1': [
  472. \ phrasing_elements,
  473. \ global_attributes
  474. \ ],
  475. \ 'h2': [
  476. \ phrasing_elements,
  477. \ global_attributes
  478. \ ],
  479. \ 'h3': [
  480. \ phrasing_elements,
  481. \ global_attributes
  482. \ ],
  483. \ 'h4': [
  484. \ phrasing_elements,
  485. \ global_attributes
  486. \ ],
  487. \ 'h5': [
  488. \ phrasing_elements,
  489. \ global_attributes
  490. \ ],
  491. \ 'h6': [
  492. \ phrasing_elements,
  493. \ global_attributes
  494. \ ],
  495. \ 'head': [
  496. \ metadata_elements + ['title', 'base'],
  497. \ global_attributes
  498. \ ],
  499. \ 'header': [
  500. \ filter(copy(flow_elements), "!(v:val =~ 'address\\|header\\|footer')"),
  501. \ global_attributes
  502. \ ],
  503. \ 'hgroup': [
  504. \ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
  505. \ global_attributes
  506. \ ],
  507. \ 'hr': [
  508. \ [],
  509. \ global_attributes
  510. \ ],
  511. \ 'html': [
  512. \ ['head', 'body'],
  513. \ extend(copy(global_attributes), {'manifest': [], 'version': ['HTML+RDFa 1.1']})
  514. \ ],
  515. \ 'i': [
  516. \ phrasing_elements,
  517. \ global_attributes
  518. \ ],
  519. \ 'iframe': [
  520. \ [],
  521. \ extend(copy(global_attributes), {'src': [], 'name': [], 'width': [], 'height': [], 'sandbox': ['allow-same-origin', 'allow-forms', 'allow-scripts'], 'seamless': ['seamless', '']})
  522. \ ],
  523. \ 'img': [
  524. \ [],
  525. \ extend(copy(global_attributes), {'src': [], 'alt': [], 'height': [], 'width': [], 'usemap': [], 'ismap': ['ismap', '']})
  526. \ ],
  527. \ 'input': [
  528. \ [],
  529. \ extend(copy(global_attributes), {'type': ['text', 'password', 'checkbox', 'radio', 'button', 'submit', 'reset', 'file', 'hidden', 'image', 'datetime', 'datetime-local', 'date', 'month', 'time', 'week', 'number', 'range', 'email', 'url', 'search', 'tel', 'coloe'], 'name': [], 'disabled': ['disabled', ''], 'form': [], 'maxlength': [], 'readonly': ['readonly', ''], 'size': [], 'value': [], 'autocomplete': ['on', 'off'], 'autofocus': ['autofocus', ''], 'list': [], 'pattern': [], 'required': ['required', ''], 'placeholder': [], 'checked': ['checked'], 'accept': [], 'multiple': ['multiple', ''], 'alt': [], 'src': [], 'height': [], 'width': [], 'min': [], 'max': [], 'step': [], 'formenctype': ['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'], 'formmethod': ['get', 'post', 'put', 'delete'], 'formtarget': [], 'formnovalidate': ['formnovalidate', '']})
  530. \ ],
  531. \ 'ins': [
  532. \ flow_elements,
  533. \ extend(copy(global_attributes), {'cite': [], 'datetime': []})
  534. \ ],
  535. \ 'kbd': [
  536. \ phrasing_elements,
  537. \ global_attributes
  538. \ ],
  539. \ 'keygen': [
  540. \ [],
  541. \ extend(copy(global_attributes), {'challenge': [], 'keytype': ['rsa'], 'autofocus': ['autofocus', ''], 'name': [], 'disabled': ['disabled', ''], 'form': []})
  542. \ ],
  543. \ 'label': [
  544. \ filter(copy(phrasing_elements), "!(v:val =~ 'label')"),
  545. \ extend(copy(global_attributes), {'for': [], 'form': []})
  546. \ ],
  547. \ 'legend': [
  548. \ phrasing_elements,
  549. \ global_attributes
  550. \ ],
  551. \ 'li': [
  552. \ flow_elements,
  553. \ extend(copy(global_attributes), {'value': []})
  554. \ ],
  555. \ 'link': [
  556. \ [],
  557. \ extend(copy(global_attributes), {'href': [], 'rel': linkreltypes, 'hreflang': lang_tag, 'media': [], 'type': [], 'sizes': ['any']})
  558. \ ],
  559. \ 'map': [
  560. \ flow_elements,
  561. \ extend(copy(global_attributes), {'name': []})
  562. \ ],
  563. \ 'mark': [
  564. \ phrasing_elements,
  565. \ global_attributes
  566. \ ],
  567. \ 'menu': [
  568. \ flow_elements + ['li'],
  569. \ extend(copy(global_attributes), {'type': ['toolbar', 'context'], 'label': []})
  570. \ ],
  571. \ 'meta': [
  572. \ [],
  573. \ extend(copy(global_attributes), {'name': [], 'http-equiv': ['refresh', 'default-style', 'content-type'], 'content': [], 'charset': charset})
  574. \ ],
  575. \ 'meter': [
  576. \ phrasing_elements,
  577. \ extend(copy(global_attributes), {'value': [], 'min': [], 'low': [], 'high': [], 'max': [], 'optimum': []})
  578. \ ],
  579. \ 'nav': [
  580. \ flow_elements,
  581. \ global_attributes
  582. \ ],
  583. \ 'noscript': [
  584. \ flow_elements + ['link', 'meta', 'style'],
  585. \ global_attributes
  586. \ ],
  587. \ 'object': [
  588. \ flow_elements + ['param'],
  589. \ extend(copy(global_attributes), {'data': [], 'type': [], 'height': [], 'width': [], 'usemap': [], 'name': [], 'form': []})
  590. \ ],
  591. \ 'ol': [
  592. \ ['li'],
  593. \ extend(copy(global_attributes), {'start': [], 'reversed': ['reversed', '']})
  594. \ ],
  595. \ 'optgroup': [
  596. \ ['option'],
  597. \ extend(copy(global_attributes), {'label': [], 'disabled': ['disabled', '']})
  598. \ ],
  599. \ 'option': [
  600. \ [''],
  601. \ extend(copy(global_attributes), {'disabled': ['disabled', ''], 'selected': ['selected', ''], 'label': [], 'value': []})
  602. \ ],
  603. \ 'output': [
  604. \ phrasing_elements,
  605. \ extend(copy(global_attributes), {'name': [], 'form': [], 'for': []})
  606. \ ],
  607. \ 'p': [
  608. \ phrasing_elements,
  609. \ global_attributes
  610. \ ],
  611. \ 'param': [
  612. \ [],
  613. \ extend(copy(global_attributes), {'name': [], 'value': []})
  614. \ ],
  615. \ 'pre': [
  616. \ phrasing_elements,
  617. \ global_attributes
  618. \ ],
  619. \ 'progress': [
  620. \ filter(copy(phrasing_elements), "!(v:val =~ 'progress')"),
  621. \ extend(copy(global_attributes), {'value': [], 'max': []})
  622. \ ],
  623. \ 'q': [
  624. \ phrasing_elements,
  625. \ extend(copy(global_attributes), {'cite': []})
  626. \ ],
  627. \ 'rp': [
  628. \ phrasing_elements,
  629. \ global_attributes
  630. \ ],
  631. \ 'rt': [
  632. \ phrasing_elements,
  633. \ global_attributes
  634. \ ],
  635. \ 'ruby': [
  636. \ phrasing_elements + ['rp', 'rt'],
  637. \ global_attributes
  638. \ ],
  639. \ 'samp': [
  640. \ phrasing_elements,
  641. \ global_attributes
  642. \ ],
  643. \ 'script': [
  644. \ [],
  645. \ extend(copy(global_attributes), {'src': [], 'defer': ['defer', ''], 'async': ['async', ''], 'type': [], 'charset': charset})
  646. \ ],
  647. \ 'section': [
  648. \ flow_elements + ['style'],
  649. \ global_attributes
  650. \ ],
  651. \ 'select': [
  652. \ ['optgroup', 'option'],
  653. \ extend(copy(global_attributes), {'name': [], 'disabled': ['disabled', ''], 'form': [], 'size': [], 'multiple': ['multiple', '']})
  654. \ ],
  655. \ 'small': [
  656. \ phrasing_elements,
  657. \ global_attributes
  658. \ ],
  659. \ 'source': [
  660. \ [],
  661. \ extend(copy(global_attributes), {'src': [], 'type': [], 'media': []})
  662. \ ],
  663. \ 'span': [
  664. \ phrasing_elements,
  665. \ global_attributes
  666. \ ],
  667. \ 'strong': [
  668. \ phrasing_elements,
  669. \ global_attributes
  670. \ ],
  671. \ 'style': [
  672. \ [],
  673. \ extend(copy(global_attributes), {'type': [], 'media': [], 'scoped': ['scoped', '']})
  674. \ ],
  675. \ 'sub': [
  676. \ phrasing_elements,
  677. \ global_attributes
  678. \ ],
  679. \ 'summary': [
  680. \ phrasing_elements,
  681. \ global_attributes
  682. \ ],
  683. \ 'sup': [
  684. \ phrasing_elements,
  685. \ global_attributes
  686. \ ],
  687. \ 'table': [
  688. \ ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody', 'tr'],
  689. \ extend(copy(global_attributes), {'border': []})
  690. \ ],
  691. \ 'tbody': [
  692. \ ['tr'],
  693. \ global_attributes
  694. \ ],
  695. \ 'td': [
  696. \ flow_elements,
  697. \ extend(copy(global_attributes), {'colspan': [], 'rowspan': [], 'headers': []})
  698. \ ],
  699. \ 'textarea': [
  700. \ [''],
  701. \ extend(copy(global_attributes), {'name': [], 'disabled': ['disabled', ''], 'form': [], 'readonly': ['readonly', ''], 'maxlength': [], 'autofocus': ['autofocus', ''], 'required': ['required', ''], 'placeholder': [], 'rows': [], 'wrap': ['hard', 'soft'], 'cols': []})
  702. \ ],
  703. \ 'tfoot': [
  704. \ ['tr'],
  705. \ global_attributes
  706. \ ],
  707. \ 'th': [
  708. \ phrasing_elements,
  709. \ extend(copy(global_attributes), {'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'colspan': [], 'rowspan': [], 'headers': []})
  710. \ ],
  711. \ 'thead': [
  712. \ ['tr'],
  713. \ global_attributes
  714. \ ],
  715. \ 'time': [
  716. \ phrasing_elements,
  717. \ extend(copy(global_attributes), {'datetime': [], 'pubdate': ['pubdate', '']})
  718. \ ],
  719. \ 'title': [
  720. \ [''],
  721. \ global_attributes
  722. \ ],
  723. \ 'tr': [
  724. \ ['th', 'td'],
  725. \ global_attributes
  726. \ ],
  727. \ 'track': [
  728. \ [],
  729. \ extend(copy(global_attributes), {'kind': ['subtitles', 'captions', 'descriptions', 'chapters', 'metadata'], 'src': [], 'charset': charset, 'srclang': lang_tag, 'label': []})
  730. \ ],
  731. \ 'u': [
  732. \ phrasing_elements,
  733. \ global_attributes
  734. \ ],
  735. \ 'ul': [
  736. \ ['li'],
  737. \ global_attributes
  738. \ ],
  739. \ 'var': [
  740. \ phrasing_elements,
  741. \ global_attributes
  742. \ ],
  743. \ 'video': [
  744. \ flow_elements + ['source', 'track'],
  745. \ extend(copy(global_attributes), {'autoplay': ['autoplay', ''], 'preload': ['none', 'metadata', 'auto', ''], 'controls': ['controls', ''], 'loop': ['loop', ''], 'poster': [], 'height': [], 'width': [], 'src': []})
  746. \ ],
  747. \ 'wbr': [
  748. \ [],
  749. \ global_attributes
  750. \ ],
  751. \ 'vimxmlattrinfo' : attributes_value,
  752. \ 'vimxmltaginfo': {
  753. \ 'area': ['/>', ''],
  754. \ 'base': ['/>', ''],
  755. \ 'br': ['/>', ''],
  756. \ 'col': ['/>', ''],
  757. \ 'command': ['/>', ''],
  758. \ 'embed': ['/>', ''],
  759. \ 'hr': ['/>', ''],
  760. \ 'img': ['/>', ''],
  761. \ 'input': ['/>', ''],
  762. \ 'keygen': ['/>', ''],
  763. \ 'link': ['/>', ''],
  764. \ 'meta': ['/>', ''],
  765. \ 'param': ['/>', ''],
  766. \ 'source': ['/>', ''],
  767. \ 'track': ['/>', ''],
  768. \ 'wbr': ['/>', ''],
  769. \ },
  770. \ }