# Netscape Navigator 2.0

#======= ELEMENTS =======
$emptyTags = 'AREA|BASE|BR|FRAME|HR|HYPE|IMG|INPUT|ISINDEX|META|PARAM|WBR';
$pairTags = 'A|ADDRESS|APPLET|B|BASEFONT|BIG|BLINK|BLOCKQUOTE|BODY|CAPTION'.
            '|CENTER|CITE|CODE|DD|DIR|DIV|DL|DT|EM|EMBED|FONT|FORM|FRAMESET'.
            '|H1|H2|H3|H4|H5|H6|HEAD|HTML|I|KBD|LI|LISTING|MAP|MENU|MULTICOL'.
            '|NOBR|NOEMBED|NOFRAMES|OL|OPTION|P|PLAINTEXT|PRE|SAMP|SCRIPT'.
            '|SELECT|SERVER|SMALL|STRONG|SUB|SUP|TABLE|TD|TEXTAREA|TH|TITLE'.
            '|TR|TT|UL|VAR|XMP';
$deprecatedTags = 'LISTING|PLAINTEXT';
$omitStartTags = 'BODY|HEAD|HTML';
$omitEndTags = 'BASEFONT|BODY|DD|DT|HEAD|HTML|LI|NOBR|OPTION|P|PLAINTEXT|TD'.
               '|TH|TR';
#$maybeEmpty = 'A|ADDRESS|APPLET|B|BASEFONT|BIG|BLINK|BLOCKQUOTE|BODY|CAPTION'.
#              '|CENTER|CITE|CODE|DD|DIV|DT|EM|EMBED|FONT|FORM|H1|H2|H3|H4|H5'.
#              '|H6|I|KBD|LI|LISTING|MAP|MULTICOL|NOBR|NOEMBED|OPTION|P'.
#              '|PLAINTEXT|PRE|SAMP|SCRIPT|SERVER|SMALL|STRONG|SUB|SUP|TD'.
#              '|TEXTAREA|TH|TITLE|TR|TT|VAR|XMP';
$maybeEmpty = 'PLAINTEXT|PRE|SCRIPT|SERVER|EMBED|TD|TEXTAREA|TH|XMP';
%requiredTags = (
  'HEAD'  => 'TITLE',
  'HTML'  => 'HEAD|#001',
  'TABLE' => 'TR',
);
%onceonlyTags = (
  '#001'     => 'BODY|FRAMESET',
  'HEAD'     => 'TITLE|ISINDEX|BASE',
  'HTML'     => 'HEAD|#001|PLAINTEXT',
  'NOFRAMES' => 'BODY',
  'TABLE'    => 'CAPTION',
);
$sequencialTags = 'TABLE|HTML';
%tagsElements = (
  '#000'       => 'MULTICOL|ADDRESS|TABLE|HR|ISINDEX|FORM|BLOCKQUOTE|CENTER'.
                  '|DIV|DL|LISTING|XMP|PRE|MENU|DIR|OL|UL|P|MAP|SERVER|SCRIPT'.
                  '|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET|HYPE|IMG|A|CITE'.
                  '|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB|SMALL|BIG|B|I'.
                  '|TT|#PCDATA|H6|H5|H4|H3|H2|H1',
  '#001'       => 'BODY|FRAMESET',
  'A'          => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'ADDRESS'    => 'P|MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'APPLET'     => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA|PARAM',
  'B'          => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'BASEFONT'   => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'BIG'        => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'BLINK'      => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'BLOCKQUOTE' => 'MULTICOL|ADDRESS|TABLE|HR|ISINDEX|FORM|BLOCKQUOTE|CENTER'.
                  '|DIV|DL|LISTING|XMP|PRE|MENU|DIR|OL|UL|P|MAP|SERVER|SCRIPT'.
                  '|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET|HYPE|IMG|A|CITE'.
                  '|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB|SMALL|BIG|B|I'.
                  '|TT|#PCDATA|H6|H5|H4|H3|H2|H1',
  'BODY'       => 'MULTICOL|ADDRESS|TABLE|HR|ISINDEX|FORM|BLOCKQUOTE|CENTER'.
                  '|DIV|DL|LISTING|XMP|PRE|MENU|DIR|OL|UL|P|MAP|SERVER|SCRIPT'.
                  '|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET|HYPE|IMG|A|CITE'.
                  '|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB|SMALL|BIG|B|I'.
                  '|TT|#PCDATA|H6|H5|H4|H3|H2|H1',
  'CAPTION'    => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'CENTER'     => 'MULTICOL|ADDRESS|TABLE|HR|ISINDEX|FORM|BLOCKQUOTE|CENTER'.
                  '|DIV|DL|LISTING|XMP|PRE|MENU|DIR|OL|UL|P|MAP|SERVER|SCRIPT'.
                  '|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET|HYPE|IMG|A|CITE'.
                  '|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB|SMALL|BIG|B|I'.
                  '|TT|#PCDATA|H6|H5|H4|H3|H2|H1',
  'CITE'       => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'CODE'       => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'DD'         => 'MULTICOL|ADDRESS|TABLE|HR|ISINDEX|FORM|BLOCKQUOTE|CENTER'.
                  '|DIV|DL|LISTING|XMP|PRE|MENU|DIR|OL|UL|P|MAP|SERVER|SCRIPT'.
                  '|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET|HYPE|IMG|A|CITE'.
                  '|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB|SMALL|BIG|B|I'.
                  '|TT|#PCDATA',
  'DIR'        => 'LI',
  'DIV'        => 'MULTICOL|ADDRESS|TABLE|HR|ISINDEX|FORM|BLOCKQUOTE|CENTER'.
                  '|DIV|DL|LISTING|XMP|PRE|MENU|DIR|OL|UL|P|MAP|SERVER|SCRIPT'.
                  '|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET|HYPE|IMG|A|CITE'.
                  '|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB|SMALL|BIG|B|I'.
                  '|TT|#PCDATA|H6|H5|H4|H3|H2|H1',
  'DL'         => 'DD|DT',
  'DT'         => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'EM'         => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'EMBED'      => 'MULTICOL|ADDRESS|TABLE|HR|ISINDEX|FORM|BLOCKQUOTE|CENTER'.
                  '|DIV|DL|LISTING|XMP|PRE|MENU|DIR|OL|UL|P|MAP|SERVER|SCRIPT'.
                  '|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET|HYPE|IMG|A|CITE'.
                  '|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB|SMALL|BIG|B|I'.
                  '|TT|#PCDATA|H6|H5|H4|H3|H2|H1|NOEMBED',
  'FONT'       => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'FORM'       => 'MULTICOL|ADDRESS|TABLE|HR|ISINDEX|BLOCKQUOTE|CENTER|DIV|DL'.
                  '|LISTING|XMP|PRE|MENU|DIR|OL|UL|P|MAP|SERVER|SCRIPT|NOBR'.
                  '|WBR|BR|BASEFONT|FONT|EMBED|APPLET|HYPE|IMG|A|CITE|VAR|KBD'.
                  '|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB|SMALL|BIG|B|I|TT'.
                  '|#PCDATA|H6|H5|H4|H3|H2|H1|INPUT|SELECT|TEXTAREA',
  'FRAMESET'   => 'NOFRAMES|FRAME|FRAMESET',
  'H1'         => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'H2'         => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'H3'         => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'H4'         => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'H5'         => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'H6'         => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'HEAD'       => 'TITLE|ISINDEX|BASE|SCRIPT|SERVER|META|LINK',
  'HTML'       => 'HEAD|#001|PLAINTEXT',
  'I'          => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'KBD'        => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'LI'         => 'MULTICOL|ADDRESS|TABLE|HR|ISINDEX|FORM|BLOCKQUOTE|CENTER'.
                  '|DIV|DL|LISTING|XMP|PRE|MENU|DIR|OL|UL|P|MAP|SERVER|SCRIPT'.
                  '|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET|HYPE|IMG|A|CITE'.
                  '|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB|SMALL|BIG|B|I'.
                  '|TT|#PCDATA',
  'LISTING'    => '%literal',
  'MAP'        => 'AREA',
  'MENU'       => 'LI',
  'MULTICOL'   => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'NOBR'       => 'MAP|SERVER|SCRIPT|WBR|BR|BASEFONT|FONT|EMBED|APPLET|HYPE'.
                  '|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'NOEMBED'    => '#PCDATA',
  'NOFRAMES'   => 'BODY|#000',
  'OL'         => 'LI',
  'OPTION'     => '#PCDATA',
  'P'          => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'PLAINTEXT'  => '%literal',
  'PRE'        => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|A|CITE|VAR|KBD|SAMP'.
                  '|CODE|STRONG|EM|BLINK|B|I|TT|#PCDATA',
  'SAMP'       => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'SCRIPT'     => 'CDATA',
  'SELECT'     => 'OPTION',
  'SERVER'     => 'CDATA',
  'SMALL'      => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'STRONG'     => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'SUB'        => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'SUP'        => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'TABLE'      => 'CAPTION|TR',
  'TD'         => 'MULTICOL|ADDRESS|TABLE|HR|ISINDEX|FORM|BLOCKQUOTE|CENTER'.
                  '|DIV|DL|LISTING|XMP|PRE|MENU|DIR|OL|UL|P|MAP|SERVER|SCRIPT'.
                  '|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET|HYPE|IMG|A|CITE'.
                  '|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB|SMALL|BIG|B|I'.
                  '|TT|#PCDATA|H6|H5|H4|H3|H2|H1',
  'TEXTAREA'   => '#PCDATA',
  'TH'         => 'MULTICOL|ADDRESS|TABLE|HR|ISINDEX|FORM|BLOCKQUOTE|CENTER'.
                  '|DIV|DL|LISTING|XMP|PRE|MENU|DIR|OL|UL|P|MAP|SERVER|SCRIPT'.
                  '|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET|HYPE|IMG|A|CITE'.
                  '|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB|SMALL|BIG|B|I'.
                  '|TT|#PCDATA|H6|H5|H4|H3|H2|H1',
  'TITLE'      => '#PCDATA',
  'TR'         => 'TD|TH',
  'TT'         => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'UL'         => 'LI',
  'VAR'        => 'MAP|SERVER|SCRIPT|NOBR|WBR|BR|BASEFONT|FONT|EMBED|APPLET'.
                  '|HYPE|IMG|A|CITE|VAR|KBD|SAMP|CODE|STRONG|EM|BLINK|SUP|SUB'.
                  '|SMALL|BIG|B|I|TT|#PCDATA',
  'XMP'        => '%literal',
);
%excludedElems = (
  'A'        => 'A',
  'DIR'      => 'P|UL|OL|DIR|MENU|PRE|XMP|LISTING|DL|DIV|CENTER|BLOCKQUOTE'.
                '|FORM|ISINDEX|HR|TABLE|ADDRESS|MULTICOL',
  'FORM'     => 'FORM',
  'MENU'     => 'P|UL|OL|DIR|MENU|PRE|XMP|LISTING|DL|DIV|CENTER|BLOCKQUOTE'.
                '|FORM|ISINDEX|HR|TABLE|ADDRESS|MULTICOL',
  'NOBR'     => 'NOBR',
  'NOEMBED'  => 'NOEMBED',
  'NOFRAMES' => 'NOFRAMES',
  'PRE'      => 'IMG|APPLET|HYPE|BIG|SMALL|SUB|SUP|FONT|EMBED',
  'SELECT'   => 'INPUT|SELECT|TEXTAREA',
  'TEXTAREA' => 'INPUT|SELECT|TEXTAREA',
  'TITLE'    => 'SCRIPT|SERVER|META|LINK',
);
%includedElems = (
  'FORM' => 'INPUT|SELECT|TEXTAREA',
  'HEAD' => 'SCRIPT|SERVER|META|LINK',
);
#======= ATTRIBUTES =======
%tagsAttributes = (
  'A' => {
    'HREF'        => '%URL',
    'NAME'        => 'CDATA',
    'ONCLICK'     => '%Script',
    'ONMOUSEOUT'  => '%Script',
    'ONMOUSEOVER' => '%Script',
    'TARGET'      => 'CDATA',
  },
  'APPLET' => {
    'ALIGN'    => 'TOP|BOTTOM|LEFT|RIGHT',
    'ALT'      => 'CDATA',
    'CODE'     => '%URL',
    'CODEBASE' => '%URL',
    'HEIGHT'   => '%Length',
    'HSPACE'   => '%Pixels',
    'NAME'     => 'CDATA',
    'VSPACE'   => '%Pixels',
    'WIDTH'    => '%Length',
  },
  'AREA' => {
    'ALT'         => 'CDATA',
    'COORDS'      => '%COORDS',
    'HREF'        => '%URL',
    'NOHREF'      => 'NOHREF',
    'ONMOUSEOUT'  => '%Script',
    'ONMOUSEOVER' => '%Script',
    'SHAPE'       => 'RECT|CIRCLE|POLY|DEFAULT',
    'TARGET'      => 'CDATA',
  },
  'BASE' => {
    'HREF'   => '%URL',
    'TARGET' => 'CDATA',
  },
  'BASEFONT' => {
    'SIZE' => '%fsize',
  },
  'BODY' => {
    'ALINK'      => '%color',
    'BACKGROUND' => '%URL',
    'BGCOLOR'    => '%color',
    'LINK'       => '%color',
    'ONBLUR'     => '%Script',
    'ONFOCUS'    => '%Script',
    'ONLOAD'     => '%Script',
    'ONUNLOAD'   => '%Script',
    'TEXT'       => '%color',
    'VLINK'      => '%color',
  },
  'BR' => {
    'CLEAR' => 'LEFT|ALL|RIGHT',
  },
  'CAPTION' => {
    'ALIGN' => 'TOP|BOTTOM',
  },
  'DIV' => {
    'ALIGN' => 'LEFT|CENTER|RIGHT',
  },
  'DL' => {
    'COMPACT' => 'COMPACT',
  },
  'EMBED' => {
    'ALIGN'       => 'LEFT|RIGHT|TOP|BOTTOM',
    'BORDER'      => '%border',
    'FRAMEBORDER' => 'NO',
    'HEIGHT'      => '%Pixels',
    'HIDDEN'      => 'TRUE|FALSE',
    'HSPACE'      => '%Pixels',
    'NAME'        => 'CDATA',
    'PALETTE'     => 'FOREGROUND|BACKGROUND',
    'PLUGINSPAGE' => '%URL',
    'PLUGINURL'   => '%URL',
    'SRC'         => '%URL',
    'TYPE'        => '%MIMEType',
    'UNITS'       => '%Pixels',
    'VSPACE'      => '%Pixels',
    'WIDTH'       => '%Pixels',
  },
  'FONT' => {
    'COLOR' => '%color',
    'SIZE'  => '%rsize',
  },
  'FORM' => {
    'ACTION'   => '%URL',
    'ENCTYPE'  => '%Content-Type',
    'METHOD'   => 'GET|POST',
    'NAME'     => 'CDATA',
    'ONRESET'  => '%Script',
    'ONSUBMIT' => '%Script',
    'TARGET'   => 'CDATA',
  },
  'FRAME' => {
    'MARGINHEIGHT' => '%Pixels',
    'MARGINWIDTH'  => '%Pixels',
    'NAME'         => 'CDATA',
    'NORESIZE'     => 'NORESIZE',
    'SCROLLING'    => 'YES|NO|AUTO',
    'SRC'          => '%URL',
  },
  'FRAMESET' => {
    'COLS'     => '%frame-size',
    'ONLOAD'   => '%Script',
    'ONUNLOAD' => '%Script',
    'ROWS'     => '%frame-size',
  },
  'H1' => {
    'ALIGN' => 'LEFT|CENTER|RIGHT',
  },
  'H2' => {
    'ALIGN' => 'LEFT|CENTER|RIGHT',
  },
  'H3' => {
    'ALIGN' => 'LEFT|CENTER|RIGHT',
  },
  'H4' => {
    'ALIGN' => 'LEFT|CENTER|RIGHT',
  },
  'H5' => {
    'ALIGN' => 'LEFT|CENTER|RIGHT',
  },
  'H6' => {
    'ALIGN' => 'LEFT|CENTER|RIGHT',
  },
  'HR' => {
    'ALIGN'   => 'LEFT|RIGHT|CENTER',
    'NOSHADE' => 'NOSHADE',
    'SIZE'    => '%Pixels',
    'WIDTH'   => '%Length',
  },
  'IMG' => {
    'ALIGN'   => 'TOP|BOTTOM|LEFT|RIGHT',
    'ALT'     => 'CDATA',
    'BORDER'  => '%Pixels',
    'HEIGHT'  => '%Length',
    'HSPACE'  => '%Pixels',
    'ISMAP'   => 'ISMAP',
    'LOWSRC'  => '%URL',
    'NAME'    => 'CDATA',
    'ONABORT' => '%Script',
    'ONERROR' => '%Script',
    'ONLOAD'  => '%Script',
    'SRC'     => '%URL',
    'USEMAP'  => '%URLwithName',
    'VSPACE'  => '%Pixels',
    'WIDTH'   => '%Length',
  },
  'INPUT' => {
    'ALIGN'     => 'TOP|BOTTOM|LEFT|RIGHT',
    'BORDER'    => '%border',
    'CHECKED'   => 'CHECKED',
    'HEIGHT'    => '%Length',
    'MAXLENGTH' => 'NUMBER',
    'NAME'      => 'CDATA',
    'ONBLUR'    => '%Script',
    'ONCHANGE'  => '%Script',
    'ONCLICK'   => '%Script',
    'ONFOCUS'   => '%Script',
    'ONSELECT'  => '%Script',
    'SIZE'      => '%Pixels',
    'SRC'       => '%URL',
    'TYPE'      => 'BUTTON|CHECKBOX|FILE|HIDDEN|IMAGE|PASSWORD|RADIO|RESET'.
                   '|SUBMIT|TEXT',
    'VALUE'     => 'CDATA',
    'WIDTH'     => '%Length',
  },
  'ISINDEX' => {
    'PROMPT' => 'CDATA',
  },
  'LI' => {
    'TYPE'  => '%LIStyle',
    'VALUE' => 'NUMBER',
  },
  'MAP' => {
    'NAME' => 'CDATA',
  },
  'META' => {
    'CONTENT'    => 'CDATA',
    'HTTP-EQUIV' => 'NAME',
    'NAME'       => 'NAME',
  },
  'MULTICOL' => {
    'COLS'   => 'NUMBER',
    'GUTTER' => '%Pixels',
    'WIDTH'  => '%Pixels',
  },
  'OL' => {
    'START' => 'NUMBER',
    'TYPE'  => '%OLStyle',
  },
  'OPTION' => {
    'SELECTED' => 'SELECTED',
    'VALUE'    => 'CDATA',
  },
  'P' => {
    'ALIGN' => 'LEFT|CENTER|RIGHT',
  },
  'PARAM' => {
    'NAME'  => 'NMTOKEN',
    'VALUE' => 'CDATA',
  },
  'PRE' => {
    'COLS' => 'NUMBER',
    'WRAP' => 'WRAP',
  },
  'SCRIPT' => {
    'LANGUAGE' => 'CDATA',
  },
  'SELECT' => {
    'MULTIPLE' => 'MULTIPLE',
    'NAME'     => 'CDATA',
    'ONBLUR'   => '%Script',
    'ONCHANGE' => '%Script',
    'ONCLICK'  => '%Script',
    'ONFOCUS'  => '%Script',
    'SIZE'     => '%Pixels',
  },
  'TABLE' => {
    'ALIGN'       => 'LEFT|RIGHT',
    'BORDER'      => '%border',
    'CELLPADDING' => '%Pixels',
    'CELLSPACING' => '%Pixels',
    'HEIGHT'      => '%Pixels',
    'HSPACE'      => '%Pixels',
    'VSPACE'      => '%Pixels',
    'WIDTH'       => '%Length',
  },
  'TD' => {
    'ALIGN'   => 'LEFT|CENTER|RIGHT',
    'COLSPAN' => 'NUMBER',
    'HEIGHT'  => '%Length',
    'NOWRAP'  => 'NOWRAP',
    'ROWSPAN' => 'NUMBER',
    'VALIGN'  => 'TOP|MIDDLE|BOTTOM|BASELINE',
    'WIDTH'   => '%Length',
  },
  'TEXTAREA' => {
    'COLS'     => 'NUMBER',
    'NAME'     => 'CDATA',
    'ONBLUR'   => '%Script',
    'ONCHANGE' => '%Script',
    'ONFOCUS'  => '%Script',
    'ONSELECT' => '%Script',
    'ROWS'     => 'NUMBER',
    'WRAP'     => 'OFF|HARD|SOFT',
  },
  'TH' => {
    'ALIGN'   => 'LEFT|CENTER|RIGHT',
    'COLSPAN' => 'NUMBER',
    'HEIGHT'  => '%Length',
    'NOWRAP'  => 'NOWRAP',
    'ROWSPAN' => 'NUMBER',
    'VALIGN'  => 'TOP|MIDDLE|BOTTOM|BASELINE',
    'WIDTH'   => '%Length',
  },
  'TR' => {
    'ALIGN'  => 'LEFT|CENTER|RIGHT',
    'VALIGN' => 'TOP|MIDDLE|BOTTOM|BASELINE',
  },
  'UL' => {
    'TYPE' => 'DISC|SQUARE|CIRCLE',
  },
);
%requiredAttrs = (
  'A'        => 'NAME|HREF',
  'APPLET'   => 'CODE&WIDTH&HEIGHT',
  'AREA'     => 'COORDS&HREF',
  'BASE'     => 'HREF',
  'EMBED'    => 'SRC|TYPE',
  'FRAME'    => 'SRC',
  'FRAMESET' => 'ROWS|COLS',
  'IMG'      => 'SRC',
  'MAP'      => 'NAME',
  'META'     => 'CONTENT',
  'MULTICOL' => 'COLS',
  'PARAM'    => 'NAME&VALUE',
  'SCRIPT'   => 'LANGUAGE',
  'SELECT'   => 'NAME',
  'TEXTAREA' => 'NAME&COLS',
);
#======= ENTITIES =======
%refEntities = (
  'AElig'  => '&#198;',
  'Aacute' => '&#193;',
  'Acirc'  => '&#194;',
  'Agrave' => '&#192;',
  'Aring'  => '&#197;',
  'Atilde' => '&#195;',
  'Auml'   => '&#196;',
  'Ccedil' => '&#199;',
  'ETH'    => '&#208;',
  'Eacute' => '&#201;',
  'Ecirc'  => '&#202;',
  'Egrave' => '&#200;',
  'Euml'   => '&#203;',
  'Iacute' => '&#205;',
  'Icirc'  => '&#206;',
  'Igrave' => '&#204;',
  'Iuml'   => '&#207;',
  'Ntilde' => '&#209;',
  'Oacute' => '&#211;',
  'Ocirc'  => '&#212;',
  'Ograve' => '&#210;',
  'Oslash' => '&#216;',
  'Otilde' => '&#213;',
  'Ouml'   => '&#214;',
  'THORN'  => '&#222;',
  'Uacute' => '&#218;',
  'Ucirc'  => '&#219;',
  'Ugrave' => '&#217;',
  'Uuml'   => '&#220;',
  'Yacute' => '&#221;',
  'aacute' => '&#225;',
  'acirc'  => '&#226;',
  'acute'  => '&#180;',
  'aelig'  => '&#230;',
  'agrave' => '&#224;',
  'amp'    => '&#38;',
  'aring'  => '&#229;',
  'atilde' => '&#227;',
  'auml'   => '&#228;',
  'brvbar' => '&#166;',
  'ccedil' => '&#231;',
  'cedil'  => '&#184;',
  'cent'   => '&#162;',
  'copy'   => '&#169;',
  'curren' => '&#164;',
  'deg'    => '&#176;',
  'divide' => '&#247;',
  'eacute' => '&#233;',
  'ecirc'  => '&#234;',
  'egrave' => '&#232;',
  'eth'    => '&#240;',
  'euml'   => '&#235;',
  'frac12' => '&#189;',
  'frac14' => '&#188;',
  'frac34' => '&#190;',
  'gt'     => '&#62;',
  'iacute' => '&#237;',
  'icirc'  => '&#238;',
  'iexcl'  => '&#161;',
  'igrave' => '&#236;',
  'iquest' => '&#191;',
  'iuml'   => '&#239;',
  'laquo'  => '&#171;',
  'lt'     => '&#60;',
  'macr'   => '&#175;',
  'micro'  => '&#181;',
  'middot' => '&#183;',
  'nbsp'   => '&#160;',
  'not'    => '&#172;',
  'ntilde' => '&#241;',
  'oacute' => '&#243;',
  'ocirc'  => '&#244;',
  'ograve' => '&#242;',
  'ordf'   => '&#170;',
  'ordm'   => '&#186;',
  'oslash' => '&#248;',
  'otilde' => '&#245;',
  'ouml'   => '&#246;',
  'para'   => '&#182;',
  'plusmn' => '&#177;',
  'pound'  => '&#163;',
  'quot'   => '&#34;',
  'raquo'  => '&#187;',
  'reg'    => '&#174;',
  'sect'   => '&#167;',
  'shy'    => '&#173;',
  'sup1'   => '&#185;',
  'sup2'   => '&#178;',
  'sup3'   => '&#179;',
  'szlig'  => '&#223;',
  'thorn'  => '&#254;',
  'times'  => '&#215;',
  'uacute' => '&#250;',
  'ucirc'  => '&#251;',
  'ugrave' => '&#249;',
  'uml'    => '&#168;',
  'uuml'   => '&#252;',
  'yacute' => '&#253;',
  'yen'    => '&#165;',
  'yuml'   => '&#255;',
);
%refParams = (
  'COORDS'       => '(?:\d+(?:\s*,\s*|\s+))+\d+',
  'Content-Type' => 'CDATA+',
  'LIStyle'      => '&LIStype',
  'Length'       => '\d+[%]?',
  'MIMEType'     => 'CDATA+',
  'OLStyle'      => '&OLStype',
  'Pixels'       => '\d+',
  'Script'       => 'CDATA',
  'URL'          => '&URL',
  'URLwithName'  => '&URL',
  'border'       => '(?i)\d+|BORDER',
  'frame-size'   => '(?:(?:\d+[*%]?|\*)\s*,\s*)*(?:\d+[*%]?|\*)',
  'fsize'        => '[1-7]',
  'rsize'        => '[+|-]?[1-7]',
  'literal'      => 'CDATA',
  'color'        => '(?i)#[0-9A-F]{6}'.
                    '|aqua|black|blue|fuchsia|gray|green|lime|maroon'.
                    '|navy|olive|purple|red|silver|teal|white|yellow'.
                    '|aliceblue|antiquewhite|aquamarine|azure'.
                    '|beige|bisque|blanchedalmond|blueviolet|brown|burlywood'.
                    '|cadetblue|chartreuse|chocolate|coral|cornflowerblue'.
                    '|cornsilk|crimson|cyan'.
                    '|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen'.
                    '|darkkhaki|darkmagenta|darkolivegreen|darkorange'.
                    '|darkorchid|darkred|darksalmon|darkseagreen'.
                    '|darkslateblue|darkslategray|darkturquoise|darkviolet'.
                    '|deeppink|deepskyblue|dimgray|dodgerblue'.
                    '|firebrick|floralwhite|forestgreen'.
                    '|gainsboro|ghostwhite|gold|goldenrod|greenyellow'.
                    '|honeydew|hotpink|indianred|indigo|ivory|khaki'.
                    '|lavender|lavenderblush|lawngreen|lemonchiffon'.
                    '|lightblue|lightcoral|lightcyan|lightgoldenrodyellow'.
                    '|lightgreen|lightgrey|lightpink|lightsalmon'.
                    '|lightseagreen|lightskyblue|lightslategray'.
                    '|lightsteelblue|lightyellow|limegreen|linen'.
                    '|magenta|mediumaquamarine|mediumblue|mediumorchid'.
                    '|mediumpurple|mediumseagreen|mediumslateblue'.
                    '|mediumspringgreen|mediumturquoise|mediumvioletred'.
                    '|midnightblue|mintcream|mistyrose|moccasin'.
                    '|navajowhite|oldlace|olivedrab|orange|orangered|orchid'.
                    '|palegoldenrod|palegreen|paleturquoise|palevioletred'.
                    '|papayawhip|peachpuff|peru|pink|plum|powderblue'.
                    '|rosybrown|royalblue'.
                    '|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna'.
                    '|skyblue|slateblue|slategray|snow|springgreen|steelblue'.
                    '|tan|thistle|tomato|turquoise|violet'.
                    '|wheat|whitesmoke|yellowgreen',
);

1;
