home *** CD-ROM | disk | FTP | other *** search
/ ftp.swcp.com / ftp.swcp.com.zip / ftp.swcp.com / mac / mozilla-macos9-1.3.1.sea.bin / Mozilla1.3.1 / Chrome / comm.jar / content / editor / EdAEAttributes.js < prev    next >
Text File  |  2003-06-08  |  19KB  |  1,831 lines

  1. /*
  2.  * The contents of this file are subject to the Netscape Public
  3.  * License Version 1.1 (the "License"); you may not use this file
  4.  * except in compliance with the License. You may obtain a copy of
  5.  * the License at http://www.mozilla.org/NPL/
  6.  *
  7.  * Software distributed under the License is distributed on an "AS
  8.  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  9.  * implied. See the License for the specific language governing
  10.  * rights and limitations under the License.
  11.  *
  12.  * The Original Code is Mozilla Communicator client code, released
  13.  * March 31, 1998.
  14.  *
  15.  * The Initial Developer of the Original Code is Netscape
  16.  * Communications Corporation. Portions created by Netscape are
  17.  * Copyright (C) 1998-2001 Netscape Communications Corporation. All
  18.  * Rights Reserved.
  19.  *
  20.  * Contributor(s):
  21.  *    Beth Epperson
  22.  */
  23.  
  24. // HTML Attributes object for "Name" menulist
  25. var gHTMLAttr = {};
  26.  
  27. // JS Events Attributes object for "Name" menulist
  28. var gJSAttr = {};
  29.  
  30.  
  31. // Core HTML attribute values //
  32. // This is appended to Name menulist when "_core" is attribute name
  33. var gCoreHTMLAttr =
  34. [
  35.   "^id",
  36.     "^class",
  37.     "title"
  38. ];
  39.  
  40. // Core event attribute values //
  41. // This is appended to all JS menulists
  42. //   except those elements having "noJSEvents"
  43. //   as a value in their gJSAttr array.
  44. var gCoreJSEvents =
  45. [
  46.     "onclick",
  47.     "ondblclick",
  48.     "onmousedown",
  49.     "onmouseup",
  50.     "onmouseover",
  51.     "onmousemove",
  52.     "onmouseout",
  53.   "-",
  54.   "onkeypress",
  55.     "onkeydown",
  56.     "onkeyup"
  57. ];
  58.  
  59. // Following are commonly-used strings
  60.  
  61. // Alse accept: sRGB: #RRGGBB //
  62. var gHTMLColors =
  63. [
  64.     "Aqua",
  65.     "Black",
  66.     "Blue",
  67.     "Fuchsia",
  68.     "Gray",
  69.     "Green",
  70.     "Lime",
  71.     "Maroon",
  72.     "Navy",
  73.     "Olive",
  74.     "Purple",
  75.     "Red",
  76.     "Silver",
  77.     "Teal",
  78.     "White",
  79.     "Yellow"
  80. ];
  81.  
  82. var gHAlign =
  83. [
  84.     "left",
  85.     "center",
  86.     "right"
  87. ];
  88.  
  89. var gHAlignJustify =
  90. [
  91.     "left",
  92.     "center",
  93.     "right",
  94.     "justify"
  95. ];
  96.  
  97. var gHAlignTableContent =
  98. [
  99.     "left",
  100.     "center",
  101.     "right",
  102.     "justify",
  103.     "char"
  104. ];
  105.  
  106. var gVAlignTable =
  107. [
  108.     "top",
  109.     "middle",
  110.     "bottom",
  111.     "baseline"
  112. ];
  113.  
  114. var gTarget =
  115. [
  116.   "_blank",
  117.   "_self",
  118.   "_parent",
  119.   "_top"
  120. ];
  121.  
  122. // ================ HTML Attributes ================ //
  123. /* For each element, there is an array of attributes,
  124.    whose name is the element name,
  125.    used to fill the "Attribute Name" menulist.
  126.    For each of those attributes, if they have a specific
  127.    set of values, those are listed in an array named:
  128.    "elementName_attName".
  129.  
  130.    In each values string, the following characters
  131.    are signal to do input filtering:
  132.     "#"  Allow only integer values
  133.     "%"  Allow integer values or a number ending in "%"
  134.     "+"  Allow integer values and allow "+" or "-" as first character
  135.     "!"  Allow only one character
  136.     "^"  The first character can be only be A-Z, a-z, hyphen, underscore, colon or period
  137.     "$"  is an attribute required by HTML DTD
  138. */
  139.  
  140. /*
  141.    Most elements have the "dir" attribute,
  142.    so we use this value array
  143.    for all elements instead of specifying  
  144.    separately for each element
  145. */
  146. gHTMLAttr.all_dir =
  147. [
  148.   "ltr",
  149.   "rtl"
  150. ];
  151.  
  152.  
  153. gHTMLAttr.a =
  154. [
  155.   "charset",
  156.   "type",
  157.   "name",
  158.   "href",
  159.   "^hreflang",
  160.   "target",
  161.   "rel",
  162.   "rev",
  163.   "!accesskey",
  164.   "shape",        // with imagemap //
  165.   "coords",        // with imagemap //
  166.   "#tabindex",
  167.   "-",
  168.   "_core",
  169.   "-",
  170.   "^lang",
  171.   "dir"
  172. ];
  173.  
  174. gHTMLAttr.a_target = gTarget;
  175.  
  176. gHTMLAttr.a_rel =
  177. [
  178.   "alternate",
  179.   "stylesheet",
  180.   "start",
  181.   "next",
  182.   "prev",
  183.   "contents",
  184.   "index",
  185.   "glossary",
  186.   "copyright",
  187.   "chapter",
  188.   "section",
  189.   "subsection",
  190.   "appendix",
  191.   "help",
  192.   "bookmark"
  193. ];
  194.  
  195. gHTMLAttr.a_rev =
  196. [
  197.   "alternate",
  198.   "stylesheet",
  199.   "start",
  200.   "next",
  201.   "prev",
  202.   "contents",
  203.   "index",
  204.   "glossary",
  205.   "copyright",
  206.   "chapter",
  207.   "section",
  208.   "subsection",
  209.   "appendix",
  210.   "help",
  211.   "bookmark"
  212. ];
  213.  
  214. gHTMLAttr.a_shape =
  215. [
  216.   "rect",
  217.   "circle",
  218.   "poly",
  219.   "default"
  220. ];
  221.  
  222. gHTMLAttr.abbr =
  223. [
  224.   "_core",
  225.   "-",
  226.   "^lang",
  227.   "dir"
  228. ];
  229.  
  230. gHTMLAttr.acronym =
  231. [
  232.   "_core",
  233.   "-",
  234.   "^lang",
  235.   "dir"
  236. ];
  237.  
  238. gHTMLAttr.address =
  239. [
  240.   "_core",
  241.   "-",
  242.   "^lang",
  243.   "dir"
  244. ];
  245.  
  246. // this is deprecated //
  247. gHTMLAttr.applet =
  248. [
  249.   "codebase",
  250.   "archive",
  251.   "code",
  252.   "object",
  253.   "alt",
  254.   "name",
  255.   "%$width",
  256.   "%$height",
  257.   "align",
  258.   "#hspace",
  259.   "#vspace",
  260.   "-",
  261.   "_core"
  262. ];
  263.  
  264. gHTMLAttr.applet_align =
  265. [
  266.   "top",
  267.   "middle",
  268.   "bottom",
  269.   "left",
  270.   "right"
  271. ];
  272.  
  273. gHTMLAttr.area =
  274. [
  275.   "shape",
  276.   "coords",
  277.   "href",
  278.   "nohref",
  279.   "target",
  280.   "$alt",
  281.   "#tabindex",
  282.   "!accesskey",
  283.   "-",
  284.   "_core",
  285.   "-",
  286.   "^lang",
  287.   "dir"
  288. ];
  289.  
  290. gHTMLAttr.area_target = gTarget;
  291.  
  292. gHTMLAttr.area_shape =
  293. [
  294.   "rect",
  295.   "circle",
  296.   "poly",
  297.   "default"
  298. ];
  299.  
  300. gHTMLAttr.area_nohref =
  301. [
  302.   "nohref"
  303. ];
  304.  
  305. gHTMLAttr.b =
  306. [
  307.   "_core",
  308.   "-",
  309.   "^lang",
  310.   "dir"
  311. ];
  312.  
  313. gHTMLAttr.base =
  314. [
  315.   "href",
  316.   "target"
  317. ];
  318.  
  319. gHTMLAttr.base_target = gTarget;
  320.  
  321. // this is deprecated //
  322. gHTMLAttr.basefont =
  323. [
  324.   "^id",
  325.   "$size",
  326.   "color",
  327.   "face"
  328. ];
  329.  
  330. gHTMLAttr.basefont_color = gHTMLColors;
  331.  
  332. gHTMLAttr.bdo =
  333. [
  334.   "_core",
  335.   "-",
  336.   "^lang",
  337.   "$dir"
  338. ];
  339.  
  340. gHTMLAttr.bdo_dir =
  341. [
  342.   "ltr",
  343.   "rtl"
  344. ];
  345.  
  346. gHTMLAttr.big =
  347. [
  348.   "_core",
  349.   "-",
  350.   "^lang",
  351.   "dir"
  352. ];
  353.  
  354. gHTMLAttr.blockquote =
  355. [
  356.   "cite",
  357.   "-",
  358.   "_core",
  359.   "-",
  360.   "^lang",
  361.   "dir"
  362. ];
  363.  
  364. gHTMLAttr.body =
  365. [
  366.   "background",
  367.   "bgcolor",
  368.   "text",
  369.   "link",
  370.   "vlink",
  371.   "alink",
  372.   "-",
  373.   "_core",
  374.   "-",
  375.   "^lang",
  376.   "dir"
  377. ];
  378.  
  379. gHTMLAttr.body_bgcolor = gHTMLColors;
  380.  
  381. gHTMLAttr.body_text = gHTMLColors;
  382.  
  383. gHTMLAttr.body_link = gHTMLColors;
  384.  
  385. gHTMLAttr.body_vlink = gHTMLColors;
  386.  
  387. gHTMLAttr.body_alink = gHTMLColors;
  388.  
  389. gHTMLAttr.br =
  390. [
  391.   "clear",
  392.   "-",
  393.   "_core"
  394. ];
  395.  
  396. gHTMLAttr.br_clear =
  397. [
  398.   "none",
  399.   "left",
  400.   "all",
  401.   "right"
  402. ];
  403.  
  404. gHTMLAttr.button =
  405. [
  406.   "name",
  407.   "value",
  408.   "$type",
  409.   "disabled",
  410.   "#tabindex",
  411.   "!accesskey",
  412.   "-",
  413.   "_core",
  414.   "-",
  415.   "^lang",
  416.   "dir"
  417. ];
  418.  
  419. gHTMLAttr.button_type =
  420. [
  421.   "submit",
  422.   "button",
  423.   "reset"
  424. ];
  425.  
  426. gHTMLAttr.button_disabled =
  427. [
  428.   "disabled"
  429. ];
  430.  
  431. gHTMLAttr.caption =
  432. [
  433.   "align",
  434.   "-",
  435.   "_core",
  436.   "-",
  437.   "^lang",
  438.   "dir"
  439. ];
  440.  
  441. gHTMLAttr.caption_align =
  442. [
  443.   "top",
  444.   "bottom",
  445.   "left",
  446.   "right"
  447. ];
  448.  
  449.  
  450. // this is deprecated //
  451. gHTMLAttr.center =
  452. [
  453.   "_core",
  454.   "-",
  455.   "^lang",
  456.   "dir"
  457. ];
  458.  
  459. gHTMLAttr.cite =
  460. [
  461.   "_core",
  462.   "-",
  463.   "^lang",
  464.   "dir"
  465. ];
  466.  
  467. gHTMLAttr.code =
  468. [
  469.   "_core",
  470.   "-",
  471.   "^lang",
  472.   "dir"
  473. ];
  474.  
  475. gHTMLAttr.col =
  476. [
  477.   "#$span",
  478.   "%width",
  479.   "align",
  480.   "!char",
  481.   "#charoff",
  482.   "valign",
  483.   "char",
  484.   "-",
  485.   "_core",
  486.   "-",
  487.   "^lang",
  488.   "dir"
  489. ];
  490.  
  491. gHTMLAttr.col_span =
  492. [
  493.   "1"  // default
  494. ];
  495.  
  496. gHTMLAttr.col_align = gHAlignTableContent;
  497.  
  498. gHTMLAttr.col_valign =
  499. [
  500.   "top",
  501.   "middle",
  502.   "bottom",
  503.   "baseline"
  504. ];
  505.  
  506.  
  507. gHTMLAttr.colgroup =
  508. [
  509.   "#$span",
  510.   "%width",
  511.   "align",
  512.   "!char",
  513.   "#charoff",
  514.   "valign",
  515.   "-",
  516.   "_core",
  517.   "-",
  518.   "^lang",
  519.   "dir"
  520. ];
  521.  
  522. gHTMLAttr.colgroup_span =
  523. [
  524.   "1" // default
  525. ];
  526.  
  527. gHTMLAttr.colgroup_align = gHAlignTableContent;
  528.  
  529. gHTMLAttr.colgroup_valign =
  530. [
  531.   "top",
  532.   "middle",
  533.   "bottom",
  534.   "baseline"
  535. ];
  536.  
  537. gHTMLAttr.dd =
  538. [
  539.   "_core",
  540.   "-",
  541.   "^lang",
  542.   "dir"
  543. ];
  544.  
  545. gHTMLAttr.del =
  546. [
  547.   "cite",
  548.   "datetime",
  549.   "_core",
  550.   "-",
  551.   "^lang",
  552.   "dir"
  553. ];
  554.  
  555. gHTMLAttr.dfn =
  556. [
  557.   "_core",
  558.   "-",
  559.   "^lang",
  560.   "dir"
  561. ];
  562.  
  563. // this is deprecated //
  564. gHTMLAttr.dir =
  565. [
  566.   "compact",
  567.   "-",
  568.   "_core",
  569.   "-",
  570.   "^lang",
  571.   "dir"
  572. ];
  573.  
  574. gHTMLAttr.dir_compact =
  575. [
  576.   "compact"
  577. ];
  578.  
  579. gHTMLAttr.div =
  580. [
  581.   "align",
  582.   "-",
  583.   "_core",
  584.   "-",
  585.   "^lang",
  586.   "dir"
  587. ];
  588.  
  589. gHTMLAttr.div_align = gHAlignJustify;
  590.  
  591. gHTMLAttr.dl =
  592. [
  593.   "compact",
  594.   "-",
  595.   "_core",
  596.   "-",
  597.   "^lang",
  598.   "dir"
  599. ];
  600.  
  601. gHTMLAttr.dl_compact =
  602. [
  603.   "compact"
  604. ];
  605.  
  606.  
  607. gHTMLAttr.dt =
  608. [
  609.   "_core",
  610.   "-",
  611.   "^lang",
  612.   "dir"
  613. ];
  614.  
  615. gHTMLAttr.em =
  616. [
  617.   "_core",
  618.   "-",
  619.   "^lang",
  620.   "dir"
  621. ];
  622.  
  623. gHTMLAttr.fieldset =
  624. [
  625.   "_core",
  626.   "-",
  627.   "^lang",
  628.   "dir"
  629. ];
  630.  
  631. // this is deprecated //
  632. gHTMLAttr.font =
  633. [
  634.   "+size",
  635.   "color",
  636.   "face",
  637.   "-",
  638.   "_core",
  639.   "-",
  640.   "^lang",
  641.   "dir"
  642. ];
  643.  
  644. gHTMLAttr.font_color = gHTMLColors;
  645.  
  646. gHTMLAttr.form =
  647. [
  648.   "$action",
  649.   "$method",
  650.   "enctype",
  651.   "accept",
  652.   "name",
  653.   "accept-charset",
  654.   "target",
  655.   "-",
  656.   "_core",
  657.   "-",
  658.   "^lang",
  659.   "dir"
  660. ];
  661.  
  662. gHTMLAttr.form_method =
  663. [
  664.   "get",
  665.   "post"
  666. ];
  667.  
  668. gHTMLAttr.form_enctype =
  669. [
  670.   "application/x-www-form-urlencoded"
  671. ];
  672.  
  673. gHTMLAttr.form_target = gTarget;
  674.  
  675. gHTMLAttr.frame =
  676. [
  677.   "longdesc",
  678.   "name",
  679.   "src",
  680.   "#frameborder",
  681.   "#marginwidth",
  682.   "#marginheight",
  683.   "noresize",
  684.   "$scrolling"
  685. ];
  686.  
  687. gHTMLAttr.frame_frameborder =
  688. [
  689.   "1",
  690.   "0"
  691. ];
  692.  
  693. gHTMLAttr.frame_noresize =
  694. [
  695.   "noresize"
  696. ];
  697.  
  698. gHTMLAttr.frame_scrolling =
  699. [
  700.   "auto",
  701.   "yes",
  702.   "no"
  703. ];
  704.  
  705.  
  706. gHTMLAttr.frameset =
  707. [
  708.   "rows",
  709.   "cols",
  710.   "-",
  711.   "_core"
  712. ];
  713.  
  714. gHTMLAttr.h1 =
  715. [
  716.   "align",
  717.   "-",
  718.   "_core",
  719.   "-",
  720.   "^lang",
  721.   "dir"
  722. ];
  723.  
  724. gHTMLAttr.h1_align = gHAlignJustify;
  725.  
  726. gHTMLAttr.h2 =
  727. [
  728.   "align",
  729.   "-",
  730.   "_core",
  731.   "-",
  732.   "^lang",
  733.   "dir"
  734. ];
  735.  
  736. gHTMLAttr.h2_align = gHAlignJustify;
  737.  
  738. gHTMLAttr.h3 =
  739. [
  740.   "align",
  741.   "-",
  742.   "_core",
  743.   "-",
  744.   "^lang",
  745.   "dir"
  746. ];
  747.  
  748. gHTMLAttr.h3_align =  gHAlignJustify;
  749.  
  750. gHTMLAttr.h4 =
  751. [
  752.   "align",
  753.   "-",
  754.   "_core",
  755.   "-",
  756.   "^lang",
  757.   "dir"
  758. ];
  759.  
  760. gHTMLAttr.h4_align = gHAlignJustify;
  761.  
  762.  
  763. gHTMLAttr.h5 =
  764. [
  765.   "align",
  766.   "-",
  767.   "_core",
  768.   "-",
  769.   "^lang",
  770.   "dir"
  771. ];
  772.  
  773. gHTMLAttr.h5_align = gHAlignJustify;
  774.  
  775. gHTMLAttr.h6 =
  776. [
  777.   "align",
  778.   "-",
  779.   "_core",
  780.   "-",
  781.   "^lang",
  782.   "dir"
  783. ];
  784.  
  785. gHTMLAttr.h6_align = gHAlignJustify;
  786.  
  787. gHTMLAttr.head =
  788. [
  789.   "profile",
  790.   "-",
  791.   "^lang",
  792.   "dir"
  793. ];
  794.  
  795. gHTMLAttr.hr =
  796. [
  797.   "align",
  798.   "noshade",
  799.   "#size",
  800.   "%width",
  801.   "-",
  802.   "_core",
  803.   "-",
  804.   "^lang",
  805.   "dir"
  806. ];
  807.  
  808. gHTMLAttr.hr_align = gHAlign;
  809.  
  810. gHTMLAttr.hr_noshade = 
  811. [
  812.   "noshade"
  813. ];
  814.  
  815.  
  816. gHTMLAttr.html =
  817. [
  818.   "version",
  819.   "-",
  820.   "^lang",
  821.   "dir"
  822. ];
  823.  
  824. gHTMLAttr.i =
  825. [
  826.   "_core",
  827.   "-",
  828.   "^lang",
  829.   "dir"
  830. ];
  831.  
  832. gHTMLAttr.iframe =
  833. [
  834.   "longdesc",
  835.   "name",
  836.   "src",
  837.   "$frameborder",
  838.   "marginwidth",
  839.   "marginheight",
  840.   "$scrolling",
  841.   "align",
  842.   "%height",
  843.   "%width",
  844.   "-",
  845.   "_core"
  846. ];
  847.  
  848. gHTMLAttr.iframe_frameborder =
  849. [
  850.   "1",
  851.   "0"
  852. ];
  853.  
  854. gHTMLAttr.iframe_scrolling =
  855. [
  856.   "auto",
  857.   "yes",
  858.   "no"
  859. ];
  860.  
  861. gHTMLAttr.iframe_align =
  862. [
  863.   "top",
  864.   "middle",
  865.   "bottom",
  866.   "left",
  867.   "right"
  868. ];
  869.  
  870. gHTMLAttr.img =
  871. [
  872.   "$src",
  873.   "$alt",
  874.   "longdesc",
  875.   "name",
  876.   "%height",
  877.   "%width",
  878.   "usemap",
  879.   "ismap",
  880.   "align",
  881.   "#border",
  882.   "#hspace",
  883.   "#vspace",
  884.   "-",
  885.   "_core",
  886.   "-",
  887.   "^lang",
  888.   "dir"
  889. ];
  890.  
  891. gHTMLAttr.img_ismap =
  892. [
  893.   "ismap"
  894. ];
  895.  
  896. gHTMLAttr.img_align =
  897. [
  898.   "top",
  899.   "middle",
  900.   "bottom",
  901.   "left",
  902.   "right"
  903. ];
  904.  
  905. gHTMLAttr.input =
  906. [
  907.   "$type",
  908.   "name",
  909.   "value",
  910.   "checked",
  911.   "disabled",
  912.   "readonly",
  913.   "#size",
  914.   "#maxlength",
  915.   "src",
  916.   "alt",
  917.   "usemap",
  918.   "ismap",
  919.   "#tabindex",
  920.   "!accesskey",
  921.   "accept",
  922.   "align",
  923.   "-",
  924.   "_core",
  925.   "-",
  926.   "^lang",
  927.   "dir"
  928. ];
  929.  
  930. gHTMLAttr.input_type =
  931. [
  932.   "text",
  933.   "password",
  934.   "checkbox",
  935.   "radio",
  936.   "submit",
  937.   "reset",
  938.   "file",
  939.   "hidden",
  940.   "image",
  941.   "button"
  942. ];
  943.  
  944. gHTMLAttr.input_checked =
  945. [
  946.   "checked"
  947. ];
  948.  
  949. gHTMLAttr.input_disabled =
  950. [
  951.   "disabled"
  952. ];
  953.  
  954. gHTMLAttr.input_readonly =
  955. [
  956.   "readonly"
  957. ];
  958.  
  959.  
  960. gHTMLAttr.input_ismap =
  961. [
  962.   "ismap"
  963. ];
  964.  
  965.  
  966. gHTMLAttr.input_align =
  967. [
  968.   "top",
  969.   "middle",
  970.   "bottom",
  971.   "left",
  972.   "right"
  973. ];
  974.  
  975. gHTMLAttr.ins =
  976. [
  977.   "cite",
  978.   "datetime",
  979.   "-",
  980.   "_core",
  981.   "-",
  982.   "^lang",
  983.   "dir"
  984. ];
  985.  
  986. gHTMLAttr.isindex =
  987. [
  988.   "prompt",
  989.   "-",
  990.   "_core",
  991.   "-",
  992.   "^lang",
  993.   "dir"
  994. ];
  995.  
  996. gHTMLAttr.kbd =
  997. [
  998.   "_core",
  999.   "-",
  1000.   "^lang",
  1001.   "dir"
  1002. ];
  1003.  
  1004. gHTMLAttr.label =
  1005. [
  1006.   "for",
  1007.   "!accesskey",
  1008.   "-",
  1009.   "_core",
  1010.   "-",
  1011.   "^lang",
  1012.   "dir"
  1013. ];
  1014.  
  1015. gHTMLAttr.legend =
  1016. [
  1017.   "!accesskey",
  1018.   "align",
  1019.   "-",
  1020.   "_core",
  1021.   "-",
  1022.   "^lang",
  1023.   "dir"
  1024. ];
  1025.  
  1026. gHTMLAttr.legend_align =
  1027. [
  1028.   "top",
  1029.   "bottom",
  1030.   "left",
  1031.   "right"
  1032. ];
  1033.  
  1034. gHTMLAttr.li =
  1035. [
  1036.   "type",
  1037.   "#value",
  1038.   "-",
  1039.   "_core",
  1040.   "-",
  1041.   "^lang",
  1042.   "dir"
  1043. ];
  1044.  
  1045. gHTMLAttr.li_type =
  1046. [
  1047.   "disc",
  1048.   "square",
  1049.   "circle",
  1050.   "-",
  1051.   "1",
  1052.   "a",
  1053.   "A",
  1054.   "i",
  1055.   "I"
  1056. ];
  1057.  
  1058. gHTMLAttr.link =
  1059. [
  1060.   "charset",
  1061.   "href",
  1062.   "^hreflang",
  1063.   "type",
  1064.   "rel",
  1065.   "rev",
  1066.   "media",
  1067.   "target",
  1068.   "-",
  1069.   "_core",
  1070.   "-",
  1071.   "^lang",
  1072.   "dir"
  1073. ];
  1074.  
  1075. gHTMLAttr.link_target = gTarget;
  1076.  
  1077. gHTMLAttr.link_rel =
  1078. [
  1079.   "alternate",
  1080.   "stylesheet",
  1081.   "start",
  1082.   "next",
  1083.   "prev",
  1084.   "contents",
  1085.   "index",
  1086.   "glossary",
  1087.   "copyright",
  1088.   "chapter",
  1089.   "section",
  1090.   "subsection",
  1091.   "appendix",
  1092.   "help",
  1093.   "bookmark"
  1094. ];
  1095.  
  1096. gHTMLAttr.link_rev =
  1097. [
  1098.   "alternate",
  1099.   "stylesheet",
  1100.   "start",
  1101.   "next",
  1102.   "prev",
  1103.   "contents",
  1104.   "index",
  1105.   "glossary",
  1106.   "copyright",
  1107.   "chapter",
  1108.   "section",
  1109.   "subsection",
  1110.   "appendix",
  1111.   "help",
  1112.   "bookmark"
  1113. ];
  1114.  
  1115. gHTMLAttr.map =
  1116. [
  1117.   "$name",
  1118.   "-",
  1119.   "_core",
  1120.   "-",
  1121.   "^lang",
  1122.   "dir"
  1123. ];
  1124.  
  1125. gHTMLAttr.menu =
  1126. [
  1127.   "compact",
  1128.   "-",
  1129.   "_core",
  1130.   "-",
  1131.   "^lang",
  1132.   "dir"
  1133. ];
  1134.  
  1135. gHTMLAttr.menu_compact =
  1136. [
  1137.   "compact"
  1138. ];
  1139.  
  1140. gHTMLAttr.meta =
  1141. [
  1142.   "http-equiv",
  1143.   "name",
  1144.   "$content",
  1145.   "scheme",
  1146.   "-",
  1147.   "^lang",
  1148.   "dir"
  1149. ];
  1150.  
  1151. gHTMLAttr.noframes =
  1152. [
  1153.   "_core",
  1154.   "-",
  1155.   "^lang",
  1156.   "dir"
  1157. ];
  1158.  
  1159. gHTMLAttr.noscript =
  1160. [
  1161.   "_core",
  1162.   "-",
  1163.   "^lang",
  1164.   "dir"
  1165. ];
  1166.  
  1167. gHTMLAttr.object =
  1168. [
  1169.   "declare",
  1170.   "classid",
  1171.   "codebase",
  1172.   "data",
  1173.   "type",
  1174.   "codetype",
  1175.   "archive",
  1176.   "standby",
  1177.   "%height",
  1178.   "%width",
  1179.   "usemap",
  1180.   "name",
  1181.   "#tabindex",
  1182.   "align",
  1183.   "#border",
  1184.   "#hspace",
  1185.   "#vspace",
  1186.   "-",
  1187.   "_core",
  1188.   "-",
  1189.   "^lang",
  1190.   "dir"
  1191. ];
  1192.  
  1193. gHTMLAttr.object_declare =
  1194. [
  1195.   "declare"
  1196. ];
  1197.  
  1198. gHTMLAttr.object_align =
  1199. [
  1200.   "top",
  1201.   "middle",
  1202.   "bottom",
  1203.   "left",
  1204.   "right"
  1205. ];
  1206.  
  1207. gHTMLAttr.ol =
  1208. [
  1209.   "type",
  1210.   "compact",
  1211.   "#start",
  1212.   "-",
  1213.   "_core",
  1214.   "-",
  1215.   "^lang",
  1216.   "dir"
  1217. ];
  1218.  
  1219. gHTMLAttr.ol_type =
  1220. [
  1221.   "1",
  1222.   "a",
  1223.   "A",
  1224.   "i",     
  1225.   "I"
  1226. ];
  1227.  
  1228. gHTMLAttr.ol_compact =
  1229. [
  1230.   "compact"
  1231. ];
  1232.  
  1233.  
  1234. gHTMLAttr.optgroup =
  1235. [
  1236.   "disabled",
  1237.   "$label",
  1238.   "-",
  1239.   "_core",
  1240.   "-",
  1241.   "^lang",
  1242.   "dir"
  1243. ];
  1244.  
  1245. gHTMLAttr.optgroup_disabled =
  1246. [
  1247.   "disabled"
  1248. ];
  1249.  
  1250.  
  1251. gHTMLAttr.option =
  1252. [
  1253.   "selected",
  1254.   "disabled",
  1255.   "label",
  1256.   "value",
  1257.   "-",
  1258.   "_core",
  1259.   "-",
  1260.   "^lang",
  1261.   "dir"
  1262. ];
  1263.  
  1264. gHTMLAttr.option_selected =
  1265. [
  1266.   "selected"
  1267. ];
  1268.  
  1269. gHTMLAttr.option_disabled =
  1270. [
  1271.   "disabled"
  1272. ];
  1273.  
  1274.  
  1275. gHTMLAttr.p =
  1276. [
  1277.   "align",
  1278.   "-",
  1279.   "_core",
  1280.   "-",
  1281.   "^lang",
  1282.   "dir"
  1283. ];
  1284.  
  1285. gHTMLAttr.p_align = gHAlignJustify;
  1286.  
  1287. gHTMLAttr.param =
  1288. [
  1289.   "^id",
  1290.   "$name",
  1291.   "value",
  1292.   "$valuetype",
  1293.   "type"
  1294. ];
  1295.  
  1296. gHTMLAttr.param_valuetype =
  1297. [
  1298.   "data",
  1299.   "ref",
  1300.   "object"
  1301. ];
  1302.  
  1303.  
  1304. gHTMLAttr.pre =
  1305. [
  1306.   "%width",
  1307.   "-",
  1308.   "_core",
  1309.   "-",
  1310.   "^lang",
  1311.   "dir"
  1312. ];
  1313.  
  1314. gHTMLAttr.q =
  1315. [
  1316.   "cite",
  1317.   "-",
  1318.   "_core",
  1319.   "-",
  1320.   "^lang",
  1321.   "dir"
  1322. ];
  1323.  
  1324. gHTMLAttr.s =
  1325. [
  1326.   "_core",
  1327.   "-",
  1328.   "^lang",
  1329.   "dir"
  1330. ];
  1331.  
  1332. gHTMLAttr.samp =
  1333. [
  1334.   "_core",
  1335.   "-",
  1336.   "^lang",
  1337.   "dir"
  1338. ];
  1339.  
  1340. gHTMLAttr.script =
  1341. [
  1342.   "charset",
  1343.   "$type",
  1344.   "language",
  1345.   "src",
  1346.   "defer"
  1347. ];
  1348.  
  1349. gHTMLAttr.script_defer =
  1350. [
  1351.   "defer"
  1352. ];
  1353.  
  1354.  
  1355. gHTMLAttr.select =
  1356. [
  1357.   "name",
  1358.   "#size",
  1359.   "multiple",
  1360.   "disabled",
  1361.   "#tabindex",
  1362.   "-",
  1363.   "_core",
  1364.   "-",
  1365.   "^lang",
  1366.   "dir"
  1367. ];
  1368.  
  1369. gHTMLAttr.select_multiple =
  1370. [
  1371.   "multiple"
  1372. ];
  1373.  
  1374. gHTMLAttr.select_disabled =
  1375. [
  1376.   "disabled"
  1377. ];
  1378.  
  1379. gHTMLAttr.small =
  1380. [
  1381.   "_core",
  1382.   "-",
  1383.   "^lang",
  1384.   "dir"
  1385. ];
  1386.  
  1387. gHTMLAttr.span =
  1388. [
  1389.   "_core",
  1390.   "-",
  1391.   "^lang",
  1392.   "dir"
  1393. ];
  1394.  
  1395. gHTMLAttr.strike =
  1396. [
  1397.   "_core",
  1398.   "-",
  1399.   "^lang",
  1400.   "dir"
  1401. ];
  1402.  
  1403. gHTMLAttr.strong =
  1404. [
  1405.   "_core",
  1406.   "-",
  1407.   "^lang",
  1408.   "dir"
  1409. ];
  1410.  
  1411. gHTMLAttr.style =
  1412. [
  1413.   "$type",
  1414.   "media",
  1415.   "title",
  1416.   "-",
  1417.   "^lang",
  1418.   "dir"
  1419. ];
  1420.  
  1421. gHTMLAttr.sub =
  1422. [
  1423.   "_core",
  1424.   "-",
  1425.   "^lang",
  1426.   "dir"
  1427. ];
  1428.  
  1429. gHTMLAttr.sup =
  1430. [
  1431.   "_core",
  1432.   "-",
  1433.   "^lang",
  1434.   "dir"
  1435. ];
  1436.  
  1437. gHTMLAttr.table =
  1438. [
  1439.   "summary",
  1440.   "%width",
  1441.   "#border",
  1442.   "frame",
  1443.   "rules",
  1444.   "#cellspacing",
  1445.   "#cellpadding",
  1446.   "align",
  1447.   "bgcolor",
  1448.   "-",
  1449.   "_core",
  1450.   "-",
  1451.   "^lang",
  1452.   "dir"
  1453. ];
  1454.  
  1455. gHTMLAttr.table_frame =
  1456. [
  1457.   "void",
  1458.   "above",
  1459.   "below",
  1460.   "hsides",
  1461.   "lhs",
  1462.   "rhs",
  1463.   "vsides",
  1464.   "box",
  1465.   "border"
  1466. ];
  1467.  
  1468. gHTMLAttr.table_rules =
  1469. [
  1470.   "none",
  1471.   "groups",
  1472.   "rows",
  1473.   "cols",
  1474.   "all"
  1475. ];
  1476.  
  1477. // Note; This is alignment of the table,
  1478. //  not table contents, like all other table child elements
  1479. gHTMLAttr.table_align = gHAlign;
  1480.  
  1481. gHTMLAttr.table_bgcolor = gHTMLColors;
  1482.  
  1483. gHTMLAttr.tbody =
  1484. [
  1485.   "align",
  1486.   "!char",
  1487.   "#charoff",
  1488.   "valign",
  1489.   "-",
  1490.   "_core",
  1491.   "-",
  1492.   "^lang",
  1493.   "dir"
  1494. ];
  1495.  
  1496. gHTMLAttr.tbody_align = gHAlignTableContent;
  1497.  
  1498. gHTMLAttr.tbody_valign = gVAlignTable;
  1499.  
  1500. gHTMLAttr.td =
  1501. [
  1502.   "abbr",
  1503.   "axis",
  1504.   "headers",
  1505.   "scope",
  1506.   "$#rowspan",
  1507.   "$#colspan",
  1508.   "align",
  1509.   "!char",
  1510.   "#charoff",
  1511.   "valign",
  1512.   "nowrap",
  1513.   "bgcolor",
  1514.   "%width",
  1515.   "%height",
  1516.   "-",
  1517.   "_core",
  1518.   "-",
  1519.   "^lang",
  1520.   "dir"
  1521. ];
  1522.  
  1523. gHTMLAttr.td_scope =
  1524. [
  1525.   "row",
  1526.   "col",
  1527.   "rowgroup",
  1528.   "colgroup"
  1529. ];
  1530.  
  1531. gHTMLAttr.td_rowspan =
  1532. [
  1533.   "1" // default
  1534. ];
  1535.  
  1536. gHTMLAttr.td_colspan =
  1537. [
  1538.   "1" // default
  1539. ];
  1540.  
  1541. gHTMLAttr.td_align = gHAlignTableContent;
  1542.  
  1543. gHTMLAttr.td_valign = gVAlignTable;
  1544.  
  1545. gHTMLAttr.td_nowrap =
  1546. [
  1547.   "nowrap"
  1548. ];
  1549.  
  1550. gHTMLAttr.td_bgcolor = gHTMLColors;
  1551.  
  1552. gHTMLAttr.textarea =
  1553. [
  1554.   "name",
  1555.   "$#rows",
  1556.   "$#cols",
  1557.   "disabled",
  1558.   "readonly",
  1559.   "#tabindex",
  1560.   "!accesskey",
  1561.   "-",
  1562.   "_core",
  1563.   "-",
  1564.   "^lang",
  1565.   "dir"
  1566. ];
  1567.  
  1568. gHTMLAttr.textarea_disabled =
  1569. [
  1570.   "disabled"
  1571. ];
  1572.  
  1573. gHTMLAttr.textarea_readonly =
  1574. [
  1575.   "readonly"
  1576. ];
  1577.  
  1578.  
  1579. gHTMLAttr.tfoot =
  1580. [
  1581.   "align",
  1582.   "!char",
  1583.   "#charoff",
  1584.   "valign",
  1585.   "-",
  1586.   "_core",
  1587.   "-",
  1588.   "^lang",
  1589.   "dir"
  1590. ];
  1591.  
  1592. gHTMLAttr.tfoot_align = gHAlignTableContent;
  1593.  
  1594. gHTMLAttr.tfoot_valign = gVAlignTable;
  1595.  
  1596. gHTMLAttr.th =
  1597. [
  1598.   "abbr",
  1599.   "axis",
  1600.   "headers",
  1601.   "scope",
  1602.   "$#rowspan",
  1603.   "$#colspan",
  1604.   "align",
  1605.   "!char",
  1606.   "#charoff",
  1607.   "valign",
  1608.   "nowrap",
  1609.   "bgcolor",
  1610.   "%width",
  1611.   "%height",
  1612.   "-",
  1613.   "_core",
  1614.   "-",
  1615.   "^lang",
  1616.   "dir"
  1617. ];
  1618.  
  1619. gHTMLAttr.th_scope =
  1620. [
  1621.   "row",
  1622.   "col",
  1623.   "rowgroup",
  1624.   "colgroup"
  1625. ];
  1626.  
  1627. gHTMLAttr.th_rowspan =
  1628. [
  1629.   "1" // default
  1630. ];
  1631.  
  1632. gHTMLAttr.th_colspan =
  1633. [
  1634.   "1" // default
  1635. ];
  1636.  
  1637. gHTMLAttr.th_align = gHAlignTableContent;
  1638.  
  1639. gHTMLAttr.th_valign = gVAlignTable;
  1640.  
  1641. gHTMLAttr.th_nowrap =
  1642. [
  1643.   "nowrap"
  1644. ];
  1645.  
  1646. gHTMLAttr.th_bgcolor = gHTMLColors;
  1647.  
  1648. gHTMLAttr.thead =
  1649. [
  1650.   "align",
  1651.   "!char",
  1652.   "#charoff",
  1653.   "valign",
  1654.   "-",
  1655.   "_core",
  1656.   "-",
  1657.   "^lang",
  1658.   "dir"
  1659. ];
  1660.  
  1661. gHTMLAttr.thead_align = gHAlignTableContent;
  1662.  
  1663. gHTMLAttr.thead_valign = gVAlignTable;
  1664.  
  1665. gHTMLAttr.title =
  1666. [
  1667.   "^lang",
  1668.   "dir"
  1669. ];
  1670.  
  1671. gHTMLAttr.tr =
  1672. [
  1673.   "align",
  1674.   "!char",
  1675.   "#charoff",
  1676.   "valign",
  1677.   "bgcolor",
  1678.   "-",
  1679.   "_core",
  1680.   "-",
  1681.   "^lang",
  1682.   "dir"
  1683. ];
  1684.  
  1685. gHTMLAttr.tr_align = gHAlignTableContent;
  1686.  
  1687. gHTMLAttr.tr_valign = gVAlignTable;
  1688.  
  1689. gHTMLAttr.tr_bgcolor = gHTMLColors;
  1690.  
  1691. gHTMLAttr.tt =
  1692. [
  1693.   "_core",
  1694.   "-",
  1695.   "^lang",
  1696.   "dir"
  1697. ];
  1698.  
  1699. gHTMLAttr.u =
  1700. [
  1701.   "_core",
  1702.   "-",
  1703.   "^lang",
  1704.   "dir"
  1705. ];
  1706. gHTMLAttr.ul =
  1707. [
  1708.   "type",
  1709.   "compact",
  1710.   "-",
  1711.   "_core",
  1712.   "-",
  1713.   "^lang",
  1714.   "dir"
  1715. ];
  1716.  
  1717. gHTMLAttr.ul_type =
  1718. [
  1719.   "disc",
  1720.   "square",
  1721.   "circle"
  1722. ];
  1723.  
  1724. gHTMLAttr.ul_compact =
  1725. [
  1726.   "compact"
  1727. ];
  1728.  
  1729.  
  1730. // Prefix with "_" since this is reserved (it's stripped out)
  1731. gHTMLAttr._var =
  1732. [
  1733.   "_core",
  1734.   "-",
  1735.   "^lang",
  1736.   "dir"
  1737. ];
  1738.  
  1739. // ================ JS Attributes ================ //
  1740. // These are element specif even handlers. 
  1741. /* Most all elements use gCoreJSEvents, so those 
  1742.    are assumed except for those listed here with "noEvents"
  1743. */
  1744.  
  1745. gJSAttr.a =
  1746. [
  1747.   "onfocus",
  1748.   "onblur"
  1749. ];
  1750.  
  1751. gJSAttr.area =
  1752. [
  1753.   "onfocus",
  1754.   "onblur"
  1755. ];
  1756.  
  1757. gJSAttr.body =
  1758. [
  1759.   "onload",
  1760.   "onupload"
  1761. ];
  1762.  
  1763. gJSAttr.button =
  1764. [
  1765.   "onfocus",
  1766.   "onblur"
  1767. ];
  1768.  
  1769. gJSAttr.form =
  1770. [
  1771.   "onsubmit",
  1772.   "onreset"
  1773. ];
  1774.  
  1775. gJSAttr.frameset =
  1776. [
  1777.   "onload",
  1778.   "onunload"
  1779. ];
  1780.  
  1781. gJSAttr.input =
  1782. [
  1783.   "onfocus",
  1784.   "onblur",
  1785.   "onselect",
  1786.   "onchange"
  1787. ];
  1788.  
  1789. gJSAttr.label =
  1790. [
  1791.   "onfocus",
  1792.   "onblur"
  1793. ];
  1794.  
  1795. gJSAttr.select =
  1796. [
  1797.   "onfocus",
  1798.   "onblur",
  1799.   "onchange"
  1800. ];
  1801.  
  1802. gJSAttr.textarea =
  1803. [
  1804.   "onfocus",
  1805.   "onblur",
  1806.   "onselect",
  1807.   "onchange"
  1808. ];
  1809.  
  1810. // Elements that don't have JSEvents:
  1811. gJSAttr.font =
  1812. [
  1813.   "noJSEvents"
  1814. ];
  1815.  
  1816. gJSAttr.applet =
  1817. [
  1818.   "noJSEvents"
  1819. ];
  1820.  
  1821. gJSAttr.isindex =
  1822. [
  1823.   "noJSEvents"
  1824. ];
  1825.  
  1826. gJSAttr.iframe =
  1827. [
  1828.   "noJSEvents"
  1829. ];
  1830.  
  1831.