layout/doc/obsolete/nav4-html.html

Wed, 31 Dec 2014 07:53:36 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:53:36 +0100
branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
permissions
-rw-r--r--

Correct small whitespace inconsistency, lost while renaming variables.

     1 <!-- This Source Code Form is subject to the terms of the Mozilla Public
     2    - License, v. 2.0. If a copy of the MPL was not distributed with this
     3    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
     5 <HTML>
     6 <HEAD>
     7    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
     8    <META NAME="Author" CONTENT="Kipp E.B. HIckman">
     9    <META NAME="GENERATOR" CONTENT="Mozilla/4.03 [en] (WinNT; I) [Netscape]">
    10    <TITLE>HTML</TITLE>
    11    <BASE HREF="file:///s|/ns/xena/htmlpars/testhtml/">
    12 </HEAD>
    13 <BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#FF0000" VLINK="#800080" ALINK="#0000FF">
    15 <H2>
    16 HTML</H2>
    17 This documents describes the complete handling of HTML in magellan. The
    18 document covers the parsing process - how HTML is lexically analysized
    19 and then interprted. After the parsing process is discussed we give a detailed
    20 analysis of each HTML tag and the attributes that are supported, the values
    21 for the attributes and how the tag is treated by magellan.
    22 <H2>
    23 Parsing</H2>
    24 HTML is tokenized by an HTML scanner. The scanner is fed unicode data to
    25 parse. Stream converters are used to translate from various encodings to
    26 unicode. The scanner separates the input stream into tokens which consist
    27 of:
    28 <UL>
    29 <LI>
    30 text</LI>
    32 <LI>
    33 tags</LI>
    35 <LI>
    36 entities</LI>
    38 <LI>
    39 script-entities</LI>
    41 <LI>
    42 comments</LI>
    44 <LI>
    45 conditional comments</LI>
    46 </UL>
    47 The HTML parsing engine uses the HTML scanner for lexical anlaysis. The
    48 parsing engine operates by attacking the input stream in a set of well
    49 defined steps:
    50 <UL>
    51 <LI>
    52 The parser processes the head portion of the document first, without emitting
    53 any output. This is done to discover a few special features of html:</LI>
    55 <UL>
    56 <LI>
    57 The parser processes META tags looking for META TARGET</LI>
    59 <LI>
    60 The parser processes META tags looking for META tags which affect the character
    61 set. Nav4 handles the very first character set defining meta tag (all others
    62 are ignored) by reloading the document with the proper character conversion
    63 module inserted into the stream pipeline.</LI>
    64 </UL>
    66 <LI>
    67 After the head portion is processed the parser then proceeds to process
    68 the body of the document</LI>
    69 </UL>
    71 <H3>
    72 Tag Processing</H3>
    73 Tags are processed by the parser by locating a <B>"tag handler"</B> for
    74 the tag. The HTML parser serves as the tag handler for all of the builtin
    75 tags documented below. Tag attribute handling is done during translation
    76 of tags into content. This mapping translates the tag attributes into content
    77 data and into style data. The translation to style data is documented below
    78 by indicating the mapping from tag attributes to their CSS1 (plus extensions)
    79 equivalents.
    80 <H3>
    81 Special Hacks</H3>
    82 The following list describes hacks added to the magellan parsing engine
    83 to deal with navigator compatibility. These are just the parser hacks,
    84 not the layout or presentation hacks. Most hacks are intriduced for HTML
    85 syntax error recovering. HTML doesn't specify much how to handle those
    86 error conditions. Netscape has made big effort to render pages with non-prefect
    87 HTML. For many reasons, new browsers need to keep compatible in thsi area.
    88 <UL>
    89 <LI>
    90 Entities can be used as escape in quoted string. For value string in name-value
    91 pair,&nbsp; see <A HREF="../testhtml/quote001.html">compatibility test
    92 quote001.html</A>. Test line 70 shows that an entity quote at the begining
    93 means the value is NOT quoted. Test line 90 shows that if the value is
    94 started with a quote, then an entity quote does NOT terminate the value
    95 string.</LI>
    97 <LI>
    98 Wrapping tags are special tags such as title, textarea, server, script,
    99 style, and etc.. The comment in ns\lib\libparse\pa_parse.c says:</LI>
   101 <BR>&nbsp; /*
   102 <BR>&nbsp;&nbsp; * These tags are special in that, after opening one of
   103 them, all other tags are ignored until the matching
   104 <BR>&nbsp;&nbsp; * closing tag.
   105 <BR>&nbsp;&nbsp; */
   106 <BR>During the searching of an end tag, comments and quoted strings are
   107 observed. see <A HREF="../testhtml/title01.html">compatibility test title01.html</A>.
   108 6.0 handles comments now, need to add quoted string.
   109 <LI>
   110 If a &lt;tr> or &lt;td> tag is seen outside any &lt;table> scope, it is
   111 ignored. see <A HREF="../testhtml/table110.htm">compatibility test table110.htm</A>.</LI>
   113 <LI>
   114 <FONT COLOR="#000000">In case of table in table but not in cell, table
   115 tags before the last table tag are ignored. We found this problem in some
   116 Netscape public pages, see bug #85118. For example, &lt;table> &lt;table
   117 border> .....,or &lt;table> &lt;tr> &lt;table border>...,&nbsp; the table
   118 will be displayed with border.&nbsp;</FONT> <A HREF="../testhtml/table201.html">compatibility
   119 test table201.html</A>. There table and tr tags are buffered for this recovery.
   120 When a TD or CAPTION tag is open, the buffer is flushed out, because we
   121 cannot buffer contents of TD or CAPTION for performance and memory constrains.
   122 They are subdoc's and can be very big. If we see a &lt;table> outside cell
   123 after previous table is flushed out, the new &lt;table> tag is ignored.
   124 Nav4.0 can discard previous table in such case. <A HREF="../testhtml/tableall.html">tableall.html
   125 </A>is the index for table test cases.</LI>
   127 <LI>
   128 Caption is not a commonly used feature. In Nav4.0, captions can be anywhere.
   129 For Captions outside cells, the first one takes effect. For captions inside
   130 cells, the last one takes effect, and they also close TD and TR. In 6.0,
   131 caption is limited to the standard position: after &lt;table>. Captions
   132 in other places are ignored, their contents are treated as text. See test
   133 case table05a.html to table05o.html.</LI>
   135 <LI>
   136 <FONT COLOR="#000000">For &lt;table> &lt;tr> &lt;tr>, the first &lt;tr>
   137 takes effect.</FONT></LI>
   139 <LI>
   140 The nav4 parser notices when it hits EOF and it's in the middle of scanning
   141 in a comment. When this happens, the parser goes back and looks for an
   142 improperly closed comment (e.g. a simple > instead of a -->). If it finds
   143 one, it reparses the input after closing out the comment.</LI>
   145 <LI>
   146 <FONT COLOR="#FF0000">XXX Brendan also pointed out that there is something
   147 similar done for tags, but I don't recall what it is right now.</FONT></LI>
   149 <LI>
   150 <FONT COLOR="#000000">When Nav4.0 sees the '&lt;' sign, it searchs for
   151 '>', observing quoted values. If it cannot find one till EOF, the '&lt;'
   152 sign is treated as text. In Xena 6.0, a limit is set for how far the '>'
   153 is searched. the default limit is 4096 char, and there is a API HTMLScanner.setMaxTagLength()
   154 to changed it. setting -1 means no limit, which is same as Nav4.0.</FONT></LI>
   155 </UL>
   156 <FONT COLOR="#FF0000">TODO:</FONT>
   157 <UL><FONT COLOR="#FF0000">Document the mapping of tag attributes into CSS1
   158 style, including any new "css1" attributes</FONT>
   159 <BR>&nbsp;</UL>
   160 <B>List of 6.0 features incompatible with 4.0</B>
   161 <UL>
   162 <LI>
   163 Navigator 4.0 value string is truncated at 82 characters. XENA60 limit
   164 is MAX_STRING_LENGTH = 2000.</LI>
   166 <BR>&nbsp;</UL>
   168 <HR WIDTH="100%">
   169 <H2>
   170 Tags (Categorically sorted)</H2>
   171 All line breaks are conditional. If the x coordinate is at the current
   172 left margin then a soft line break does nothing. Hard line breaks are ignored
   173 if the last tag did a hard line break.
   175 <P><B>divalign</B> = left | right | center | justify
   176 <BR><B>alignparam</B> = abscenter | left | right | texttop | absbottom
   177 | baseline | center | bottom | top | middle | absmiddle
   178 <BR><B>colorspec</B> = named-color | #xyz | #xxyyzz | #xxxyyyzzz | #xxxxyyyyzzzz
   179 <BR><B>clip</B> = [auto | value-or-pct-xy](1..4) (pct of width for even
   180 coordinates; pct of height for odd coordinates)
   181 <BR><B>value-or-pct = </B>an integer with an optional %; ifthe percent
   182 is present any following characters are ignored!
   183 <BR><B>coord-list</B> = <FONT COLOR="#DD0000">XXX</FONT>
   184 <BR><FONT COLOR="#000000"><B>whitespace-strip</B> = remove leading and
   185 trailing and any embedded whitespace that is not an actual space (e.g.
   186 newlines)</FONT>
   187 <H1>
   188 Head objects:</H1>
   189 <B>TITLE</B>
   190 <UL>The TITLE tag is a container tag whose contents are not HTML. The contents
   191 are pure text and are processed by the parser until the closing tag is
   192 found. There are no attributes on the tag and any whitespace present in
   193 the tag is compressed down with leading and trailing whitespace eliminated.
   194 The first TITLE tag found by the parser is used as the document's title
   195 (subsequent tags are ignored).</UL>
   196 <B>BASE</B>
   197 <UL>Sets the base element in the head portion of the document. Defines
   198 the base URL for <FONT COLOR="#DD0000">all</FONT>? links in the document.
   199 <BR>Attributes:
   200 <UL><B>HREF</B>=url [This is an absolute URL]
   201 <BR><B>TARGET</B>=string [must start with XP_ALPHA|XP_DIGIT|underscore
   202 otherwise nav4 ignores it]</UL>
   203 </UL>
   204 <B>META</B>
   205 <UL>Can define several header fields (content-encoding, author, etc.)
   206 <BR>Attributes:
   207 <UL><B>REL</B>=SMALL_BOOKMARK_ICON|LARGE_BOOKMARK_ICON
   208 <UL><B>SRC</B>=string</UL>
   209 <B>HTTP-EQUIV</B>="header: value"
   210 <UL><B>CONTENT</B>=string</UL>
   211 </UL>
   212 HTTP-EQUIV values (from libnet/mkutils.c NET_ParseMimeHeader):
   213 <UL>ACCEPT-RANGES
   214 <BR>CONTENT-DISPOSITION
   215 <BR>CONTENT-ENCODING
   216 <BR>CONTENT-RANGE
   217 <BR>CONTENT-TYPE [ defines character set only ]
   218 <BR>CONNECTION
   219 <BR>DATE
   220 <BR>EXPIRES
   221 <BR>EXT-CACHE
   222 <BR>LOCATION
   223 <BR>LAST-MODIFIED
   224 <BR>LINK
   225 <BR>PROXY-AUTHENTICATE
   226 <BR>PROXY-CONNECTION
   227 <BR>PRAGMA
   228 <BR>RANGE
   229 <BR>REFRESH
   230 <BR>SET-COOKIE
   231 <BR>SERVER
   232 <BR>WWW-AUTHENTICATE
   233 <BR>WWW-PROTECTION-TEMPLATE
   234 <BR>WINDOW-TARGET</UL>
   235 Style sheets and HTML w3c spec adds this:
   236 <UL>CONTENT-STYLE-TYPE [ last one wins; overrides header from server if
   237 any ]</UL>
   238 </UL>
   239 <B>LINK</B>
   240 <UL>List related resources. Used by extensions mechanism to find tag handlers.
   241 <FONT COLOR="#0000FF">/LINK == LINK!</FONT>
   242 <BR>Attributes:
   243 <UL><B>REL</B>=FONTDEF
   244 <UL><B>SRC</B>=url</UL>
   245 <B>REL</B>=STYLESHEET [ If MEDIA param is defined it must ==nc screen ]
   246 <UL><B>LANGUAGE</B>=LiveScript|Mocha|JavaScript1.1|JavaScript1.2
   247 <BR><B>TYPE</B>="text/javascript" | "text/css"
   248 <BR><B>HREF</B>=url
   249 <BR><B>ARCHIVE</B>=url
   250 <BR><B>CODEBASE</B>=url
   251 <BR><B>ID</B>=string
   252 <BR><B>SRC</B>=url</UL>
   253 </UL>
   254 Note: HREF takes precedence over SRC in nav4.</UL>
   255 <B>HEAD</B>
   256 <UL>/HEAD clears the "in_head" flag (but leaves the "in_body" flag alone.
   257 <BR>Text in head clears in_head, and set in_body true, just as if the author
   258 forgot the /HEAD tag.
   259 <BR>Attributes: none</UL>
   260 <B>HTML</B>
   261 <UL>Ignored.
   262 <BR>Attributes: none</UL>
   263 <B>STYLE</B>
   264 <UL>Allowed anywhere in the document. Note that entities are not parsed
   265 in the style tag's content.
   266 <BR>Attributes:
   267 <UL><B>LANGUAGE</B>=LiveScript|Mocha|JavaScript1.1|JavaScript1.2
   268 <BR><B>TYPE</B>="text/javascript" | "text/css"
   269 <BR><B>HREF</B>=url
   270 <BR><B>ARCHIVE</B>=url
   271 <BR><B>CODEBASE</B>=url
   272 <BR><B>ID</B>=string
   273 <BR><B>SRC</B>=url</UL>
   274 </UL>
   275 <B>FRAMESET</B>
   276 <UL>Frameset with rows=1 and cols=1 is ignored.
   277 <BR>Attributes:
   278 <UL><B>FRAMEBORDER</B>= no | 0 (zero) [default is no_edges=false]
   279 <BR><B>BORDER</B>= int [clamped: >= 0 &amp;&amp; &lt;= 100]
   280 <BR><B>BORDERCOLOR</B>= color
   281 <BR><B>ROWS</B>= pct-list
   282 <BR><B>COLS</B>= pct-list</UL>
   283 </UL>
   284 <B>FRAME</B>
   285 <UL>Border width of zero disables edges.
   286 <BR>Attributes:
   287 <UL><B>FRAMEBORDER</B>= no | 0 (zero) [default is framesets value]
   288 <BR><B>BORDER</B>= int [clamped; >= 0 &amp;&amp; &lt;= 100]
   289 <BR><B>BORDERCOLOR</B>= color
   290 <BR><B>NORESIZE</B>= true [default is false]
   291 <BR><B>SCROLLING</B>= yes | scroll | on | no | noscroll | off
   292 <BR><B>SRC</B>= url [clamped: prevent recursion by eliminating any anscestor
   293 references]
   294 <BR><B>NAME</B>= string
   295 <BR><B>MARGINWIDTH</B>= int (clamped: >= 1)
   296 <BR><B>MARGINHEIGHT</B>= int (clamped: >= 1)</UL>
   297 </UL>
   298 <B>NOFRAMES</B>
   299 <UL>Used when frames are disabled or for backrev browsers. Has no stylistic
   300 consequences.</UL>
   302 <H1>
   304 <HR WIDTH="100%">Body objects:</H1>
   305 &nbsp;<B>BODY</B>
   306 <UL>The tag is only processed on open tags and it is always processed.
   307 See ns\lib\layout\laytags.c, searching for "case P_BODY". During tag processing
   308 the in_head flag is set to false and the in_body flag is set to true. An
   309 attribute is ignored if the document already has that attribute set. Attributes
   310 can be set by style sheets, or by previous BODY tags. see <A HREF="../testhtml/head02.html">test
   311 head02.html</A>.
   312 <BR>Attributes:
   313 <UL><B>MARGINWIDTH</B>=int [clamped: >= 0 &amp;&amp; &lt; (windowWidth/2
   314 - 1)]
   315 <BR><B>MARGINHEIGHT</B>=int [clamped: >= 0 &amp;&amp; &lt; (windowHeight/2
   316 - 1)]
   317 <BR><B>BACKGROUND</B>=url
   318 <BR><B>BGCOLOR</B>=colorspec
   319 <BR><B>TEXT</B>=colorspec
   320 <BR><B>LINK</B>=colorspec
   321 <BR><B>VLINK</B>=colorspec
   322 <BR><B>ALINK</B>=colorspec
   323 <BR><B>ONLOAD, ONUNLOAD, UNFOCUS, ONBLUR, ONHELP</B>=script
   324 <BR><B>ID</B>=string</UL>
   325 </UL>
   326 <B>LAYER, ILAYER</B>
   327 <UL>Open layer/ilayer tag automaticly close out an open form if one is
   328 open. It does something to the soft linebreak state too.
   329 <BR>Attributes:
   330 <UL><B>LEFT</B>=value-or-pct (pct of <TT>right-left</TT> margin)
   331 <BR><B>PAGEX</B>=x (if no LEFT)
   332 <BR><B>TOP</B>=value-or-pct
   333 <BR><B>PAGEY</B>=y (if no TOP)
   334 <BR><B>CLIP</B>=clip
   335 <BR><B>WIDTH</B>=value-or-pct (pct of <TT>right-left</TT> margin)
   336 <BR><B>HEIGHT</B>=value-or-pct
   337 <BR><B>OVERFLOW</B>=string
   338 <BR><B>NAME</B>=string
   339 <BR><B>ID</B>=string
   340 <BR><B>ABOVE</B>=string
   341 <BR><B>BELOW</B>=string
   342 <BR><B>ZINDEX</B>=int [any value]
   343 <BR><B>VISIBILITY</B>=string
   344 <BR><B>BGCOLOR</B>=colorspec
   345 <BR><B>BACKGROUND</B>=url</UL>
   346 </UL>
   347 <B>NOLAYER</B>
   348 <UL>Container for content which is used when layers are disabled or unsupported.
   349 The content has no style consequences (though it could if somebody stuck
   350 in some CSS1 style rules for it).</UL>
   351 <B>P</B>
   352 <UL>Closes the paragraph. If the attribute is present then an alignment
   353 gets pushed on the alignment stack. All values are supported by nav4.
   354 <BR>Attributes:
   355 <UL><B>ALIGN</B>=divalign</UL>
   356 </UL>
   357 <B>ADDRESS</B>
   358 <UL>There are no attributes. ADDRESS closes out the open paragraph. The
   359 open tag does a conditional soft line break and then pushes a merge of
   360 the current style with italics enabled onto the style stack. The close
   361 always pop the style stack and also does a conditional soft line break.</UL>
   362 <B>PLAINTEXT, XMP</B>
   363 <UL>PLAINTEXT causes the remaining content to no longer be parsed. XMP
   364 causes the content to not parse entities or other tags. The XMP can be
   365 closed by it's own tag (on any boundary); PLAINTEXT is not closed (html3.2
   366 allows it to be closed). Both tags change the style to a fixed font of
   367 a</UL>
   368 <B>LISTING</B>
   369 <UL>Closes the paragraph. Does a hard line break on open and close. Open
   370 pushes a fixed width font style of a particular font size on the style
   371 stack. The close tag pops the top of the style stack.
   372 <BR>Attributes: none</UL>
   373 <B>PRE</B>
   374 <UL>Closes the paragraph. The open tag does a hard line break. A fixed
   375 font style (unless VARIABLE is present) is pushed on the style stack. The
   376 close tag pops the top of the style stack. It also does a hard line break.
   377 <BR>Attributes:
   378 <UL><B>WRAP</B>
   379 <BR><B>COLS</B>=int [clamped: >= 0]
   380 <BR><B>TABSTOP</B>=int [clamped: >= 0; clamped value is replaced with default
   381 value]
   382 <BR><B>VARIABLE</B></UL>
   383 </UL>
   384 <B>NOBR</B>
   385 <UL>This tag doesn't nest. Instead it just sets or clears a flag in the
   386 state machine. It has no effect on any other state.</UL>
   387 <B>CENTER</B>
   388 <UL>Closes the paragraph. Always does a conditional soft line break. The
   389 open tag pushes an alignment on the aligment stack. The close tag pops
   390 the top alignment off.
   391 <BR>Attributes: none</UL>
   392 <B>DIV</B>
   393 <UL>Closes the paragraph. Always does a conditional soft line break. COLS
   394 defines the number of columns to layout in (like MULTICOL). The open tag
   395 pushes an alignment on the alignment stack (if COLS > 1 then it pretends
   396 to be a MULTICOL tag). The close tag pops an aligment from the alignment
   397 stack.
   398 <BR>Attributes:
   399 <UL><B>ALIGN</B>=divalign
   400 <BR><B>COLS</B>=int [if cols > 1 then DIV acts like a MULTICOL tag else
   401 DIV is just a container]
   402 <UL><B>GUTTER</B>= int (clamped: >= 1)
   403 <BR><B>WIDTH</B>= value-or-pct [pct of right-left margin; clamped >= 1/0
   404 (strange code)]</UL>
   405 </UL>
   406 </UL>
   407 <B>H1-H6</B>
   408 <UL>Closes the paragraph. The open tag does a hard line break and pushes
   409 a style item which enables bold and disables fixed and italic. The close
   410 tag always pops the top item from the style stack. It also does a hard
   411 line break. If the <B>ALIGN</B> attribute is present then the open tag
   412 pushes an alignment on the alignment stack. The close tag will look at
   413 the top of the alignment stack and if its a header of any kind (H1 through
   414 H6) then the alignment is popped. In either case the close tag also does
   415 a conditional soft line break (this happens before the hard line break).
   416 <BR>Attributes:
   417 <UL><B>ALIGN</B>=divalign</UL>
   418 </UL>
   419 A note regarding closing paragraphs: Any time a close paragraph is done
   420 (for any tag) if the top of the alignment stack has a tag named "P" then
   421 a conditional soft line break is done and the alignment is popped.
   422 <H3>
   424 <HR ALIGN=LEFT WIDTH="50%"></H3>
   425 <B>TABLE</B>
   426 <UL>Close the paragraph.
   427 <BR>Attributes:
   428 <UL><B>ALIGN=</B>left|right|center|abscenter
   429 <BR><B>BORDER</B>=int [clamped: if null then -1, if &lt; 1 then 1 ]
   430 <BR><B>BORDERCOLOR</B>=string [if not supplied then set to the text color
   431 ]
   432 <BR><B>VSPACE</B>=int [ clamped: >= 0 ]
   433 <BR><B>HSPACE</B>=int [ clamped: >= 0 ]
   434 <BR><B>BGCOLOR</B>=color
   435 <BR><B>BACKGROUND</B>=url
   436 <BR><B>WIDTH</B>=value-or-pct [ % of win.width minus margins; clamped:
   437 >= 0 ]
   438 <BR><B>HEIGHT</B>=value-or-pct [ % of win.height minus margins; clamped:
   439 >= 0 ]
   440 <BR><B>CELLPADDING</B>=int [clamped: >= 0; separate pads take precedence
   441 ]
   442 <BR><B>TOPPADDING</B>= int [clamped: >= 0 ]
   443 <BR><B>BOTTOMPADDING</B>= int [clamped: >= 0 ]
   444 <BR><B>LEFTPADDING</B>= int [clamped: >= 0 ]
   445 <BR><B>RIGHTPADDING</B>= int [clamped: >= 0 ]
   446 <BR><B>CELLSPACING</B>= int [clamped: >= 0 ]
   447 <BR><B>COLS</B>=int [clamped: >= 0]</UL>
   448 The code supports more attributes in the Table attribute handler than it
   449 does in the code that gets the attributes from the tag! They are border_top,
   450 border_left, border_right, border_bottom, border_style (defaults to outset;
   451 allows for outset/dotted/none/dashed/solid/double/groove/ridge/inset).</UL>
   452 <B>TR</B>
   453 <UL>Open TR automatically closes an open table row (and an open table cell
   454 if one is open). It also automatically closes a CAPTION tag.
   455 <BR>Attributes:
   456 <UL><B>BGCOLOR</B>=color
   457 <BR><B>BACKGROUND</B>=url
   458 <BR><B>VALIGN</B>=top|bottom|middle|center(==middle)|baseline; default
   459 is top
   460 <BR><B>ALIGN</B>=left|right|middle|center(==middle); default is left</UL>
   461 </UL>
   462 <B>TH, TD</B>
   463 <UL>If no table then the tag is ignored (open or close). If no row is currently
   464 opened or the current row is current done (because of a &lt;/TR> tag) then
   465 a new row is begun. Oddly enough the tag parameters for the row come from
   466 the TH/TD tag in this case. An open of either of these tags will automatically
   467 close the previous cell.
   468 <BR>Attributes:
   469 <UL><B>COLSPAN</B>=int [clamped: >= 1 &amp;&amp; &lt;= 1000 ]
   470 <BR><B>ROWSPAN</B>=int [clamped: >= 1 &amp;&amp; &lt;= 10000 ]
   471 <BR><B>NOWRAP</B> [boolean: disables wrapping ]
   472 <BR><B>BGCOLOR</B>=color [default: inherit from the row; if not row then
   473 table; if not table then inherit from an outer table cell; this works because
   474 the style is flattened so the outer table cell will have a color]
   475 <BR><B>BACKGROUND</B>=url [same rules as bgcolor for inheritance; tile
   476 mode is inherited too and not settable by TH/TD attributes (have to use
   477 style sheets for that)]
   478 <BR><B>VALIGN</B>=top|bottom|middle|center(==middle)|baseline; default
   479 is top
   480 <BR><B>ALIGN</B>=left|right|middle|center(==middle); default is left
   481 <BR><B>WIDTH</B>=value-or-pct [ clamped: >= 0 ]
   482 <BR><B>HEIGHT</B>=value-or-pct [ clamped: >= 0 ]</UL>
   483 </UL>
   484 <B>CAPTION</B>
   485 <UL>An open caption tag will automatically close an open table row (and
   486 an open cell).
   487 <BR>Attributes:
   488 <UL><B>ALIGN</B>=bottom</UL>
   489 The code sets the vertical alignment to top w/o providing a mechanism for
   490 the user to set it (there is no VALIGN attribute).</UL>
   491 <B>MULTICOL</B>
   492 <UL>The open tag does a hard line break. The close tag checks to see if
   493 the state machine has an open multicol and if it does then it does a conditional
   494 soft line break and then continues to break until both margins are cleared
   495 of floating elements. It recomputes the margins based on the list indenting
   496 level (?). After the synthetic table is output the close tag does a hard
   497 line break.
   499 <P>This tag will treat the input as source for a table with one row and
   500 COLS columns. The data is laid out using the width divided by the number
   501 of columns. After the total height is known, the content is partitioned
   502 as evenly as possible between the columns in the table.
   503 <BR>Attributes:
   504 <UL><B>COLS</B>=int [clamped: values less than 2 cause the tag to be ignored]
   505 <BR><B>GUTTER</B>=int [clamped: >= 1]
   506 <BR><B>WIDTH</B>=value-or-pct [pct of right-left margin; clamped: >= 1/0
   507 (strange code)]</UL>
   508 </UL>
   510 <H3>
   512 <HR ALIGN=LEFT WIDTH="50%"></H3>
   513 <B>BLOCKQUOTE</B>
   514 <UL>Closes the paragraph. The open tag does a hard line break. A list with
   515 the empty-bullet style is pushed on the list stack (unless TYPE=cite/jwz
   516 then a styled list is pushed). The close tag pops any list and does a hard
   517 line break.
   518 <BR>Attributes:
   519 <UL><B>TYPE</B>=cite | jwz</UL>
   520 </UL>
   521 <B>UL, OL, MENU, DIR</B>
   522 <UL>For top-level lists (lists not in lists) a hard break is done on the
   523 open tag, otherwise a conditional-soft-break is done. Tag always does a
   524 close paragrah. The close tag does a conditional soft line break when nested;
   525 when not nested the close tag does a hard line break (even if no list is
   526 open). The open tag pushes the list on the list stack. The close tag pops
   527 any list off the list stack.
   528 <BR>Attributes:
   529 <UL><B>TYPE</B>= none | disc | circle | round | square | decimal | lower-roman
   530 | upper-roman | lower-alpha | upper-alpha | A | a | I | i [clamped: if
   531 none of the above is picked and OL then the bullet type is "number" otherwise
   532 the bullet type is "basic"]
   533 <BR><B>START</B>=int [clamped: >= 1]
   534 <BR><B>COMPACT</B></UL>
   535 </UL>
   536 <B>DL</B>
   537 <UL>Closes the paragraph. For the open tag, if the list is nested then
   538 a conditional soft line break is done otherwise a hard line break is done.
   539 The open tag pushes a list on the list stack. The close tag pops any list
   540 from the list stack. Closing the list acts like other lists closes.
   541 <BR>Attributes:
   542 <UL><B>COMPACT</B></UL>
   543 </UL>
   544 <B>LI</B>
   545 <UL>Closes the paragraph. The open tag does a conditional soft line break.
   546 Close tags are ignored (except for closing the paragraph).
   547 <BR>Attributes:
   548 <UL><B>TYPE</B>= A | a | I | i (if the containing list is an <B>OL</B>)
   549 <BR><B>TYPE</B>= round | circle | square (if the containing list is not
   550 <B>OL</B> and not <B>DL</B>)
   551 <BR><B>VALUE</B>=int [clamped: >= 1]</UL>
   552 The magellan html parser allows the full set of list item styles from the
   553 OL/DL tag instead of just the limited set that nav4 allows.</UL>
   554 <B>DD</B>
   555 <UL>Closes the paragraph. Close tags are ignored (except for closing the
   556 paragraph). DD outside a DL just advances the X coordinate of layout by
   557 a small constant. DD inside a DL does a conditional soft line break and
   558 other margin crud.
   559 <BR>Attributes: none.</UL>
   560 <B>DT</B>
   561 <UL>Closes the paragraph (open or close). Close tags are otherwise ignored.
   562 Does a conditional soft line break. Moves the X layout coordinate to the
   563 left margin.
   564 <BR>Attributes: none</UL>
   566 <H3>
   568 <HR ALIGN=LEFT WIDTH="50%"></H3>
   569 <B>A</B>
   570 <UL>Open anchors push a style on the style stack if the anchor has an <B>HREF</B>.
   571 Close anchors pop as many styles off the top of the style stack that are
   572 anchor tags (anchor tags don't nest in other words). In addition, any styles
   573 on the stack that have the ANCHOR bit set have it cleared and fiddle with
   574 the foreground and background colors.
   575 <BR>Attributes:
   576 <UL><B>NAME</B>=string
   577 <BR><B>HREF</B>=url
   578 <UL><B>TARGET</B>=target
   579 <BR><B>SUPPRESS</B>=true</UL>
   580 </UL>
   581 </UL>
   582 <B>STRIKE, S, TT, CODE, SAMPLE, KBD, B, STRONG, I, EM, VAR, CITE, BLINK,
   583 BIG, SMALL, U, INLINEINPUT, SPELL</B>
   584 <UL>The open tag pushes onto the style stack. The close tag always pops
   585 the top item from the style stack.
   586 <BR>Attributes: none</UL>
   587 <B>SUP, SUB</B>
   588 <UL>The open tag pushes a font size descrease on the style stack. The close
   589 tag always pops the top of the style stack. The open and close tag impacts
   590 the baselineThe only difference between SUP and SUB is how they impact
   591 the baseline. Note that the baseline information is forgotten after a line
   592 break; therefore a close SUP/SUB on the next line will do strange things.
   593 <BR>Attributes: none</UL>
   594 <B>SPAN</B>
   595 <UL>Ignored by the navigator.
   596 <BR>Attributes: none</UL>
   597 <B>FONT</B>
   598 <UL>The open font tag with no attributes resets the font size to the base
   599 font size. The open tag always pushes a style stack entry. The close tag
   600 always pops the top item off the style stack.
   601 <BR>Attributes:
   602 <UL><B>SIZE</B>=[+ int | - int | int ]&nbsp; [clamped: >=1 &amp;&amp; &lt;=
   603 7]
   604 <BR><B>POINT-SIZE=</B>[+ int | - int | int ] [clamped: >= 1 &amp;&amp;
   605 &lt;= 1600]
   606 <BR><B>FONT-WEIGHT</B>=[+ int | - int | int ] [clamped: >= 100 &amp;&amp;
   607 &lt;= 900]
   608 <BR><B>COLOR</B>=colorspec
   609 <BR><B>FACE</B>=string</UL>
   610 </UL>
   611 A note regarding the style stack: The pop of the stack checks to see if
   612 the top of the stack is an ANCHOR tag. If it is not an anchor then the
   613 top item is unconditionally popped. If the top of the style stack is an
   614 anchor tag then the code searches for either the bottom of the stack or
   615 the first style stack entry not created by an anchor tag. If the entry
   616 is followed by another entry then the entry is removed from the stack (an
   617 out-of-order pop in other words). In this case the anchor style stack entry
   618 is left untouched.
   619 <H3>
   621 <HR ALIGN=LEFT WIDTH="50%"></H3>
   622 <B>text, entities</B>
   623 <UL>These are basic content objects that get fed directly to the output.
   624 In navigator the text is processed by doing line-breaking (entities have
   625 been converted to text already by the parser). The line-breaking is controlled
   626 by the margin settings and the list depth, the floating elements, the style
   627 attributes (font size, etc.), the preformatted flag, the no-break flag
   628 and so on.</UL>
   629 <B>IMG, IMAGE</B>
   630 <UL>Close tag is ignored.
   631 <BR>Attributes:
   632 <UL><B>ISMAP</B>
   633 <BR><B>USEMAP</B>=url
   634 <BR><B>ALIGN</B>=alignparam
   635 <BR><B>SRC</B>=url [ whitespace is stripped ]
   636 <BR><B>LOWSRC</B>=url
   637 <BR><B>ALT</B>=string
   638 <BR><B>WIDTH</B>=value-or-pct (pct of <TT>right-left</TT> width)
   639 <BR><B>HEIGHT</B>=value-or-pct (pct of window height)
   640 <BR><B>BORDER</B>=int [clamped: >= 0]
   641 <BR><B>VSPACE</B>=int [clamped: >= 0]
   642 <BR><B>HSPACE</B>=int [clamped: >= 0]
   643 <BR><B>SUPPRESS</B>=true | false (only in blocked image layout???)</UL>
   644 </UL>
   645 <B>HR</B>
   646 <UL>Closes the paragraph. If an open tag then does a conditional soft line
   647 break. The rule inherits alignment from the parent container unless there
   648 is no container (then it's centered) or if the tag defines it's own alignment.
   649 After the object is inserted into the layout stream a soft line break is
   650 inserted as well.
   651 <BR>Attributes:
   652 <UL><B>ALIGN</B>=divalign (sort of; in laytags.c it's divalign; in layhrule.c
   653 it's left or right only)
   654 <BR><B>SIZE</B>=int (1 to 100 inclusive)
   655 <BR><B>WIDTH</B>=val-or-pct (pct of <TT>right-left</TT> width)
   656 <BR><B>NOSHADE</B></UL>
   657 </UL>
   658 <B>BR</B>
   659 <UL>Does an unconditional soft break. If clear is set then it will also
   660 soft break until either the left or right or both margins are clear of
   661 floating elements. Note that<FONT COLOR="#0000FF"> /BR == BR!</FONT>
   662 <BR>Attributes:
   663 <UL><B>CLEAR</B>=left | right | all | both</UL>
   664 </UL>
   665 <B>WBR</B>
   666 <UL>Soft word break.
   667 <BR>Attributes: none</UL>
   668 <B>EMBED</B>
   669 <UL>Close tag does nothing. Embed's operate inline just like images (they
   670 don't close the paragraph).
   671 <BR>Attributes:
   672 <UL><B>HIDDEN</B>=no | false | off
   673 <BR><B>ALIGN</B>=alignparam
   674 <BR><B>SRC</B>=url
   675 <BR><B>WIDTH</B>=val-or-pct (pct of <TT>right-left</TT> width)
   676 <BR><B>HEIGHT</B>=val-of-pct; if val is &lt; 1 (sometimes) the element
   677 gets HIDDEN automatically
   678 <BR><B>BORDER</B>=int (unsupported by navigator)
   679 <BR><B>VSPACE</B>=int [clamped: >= 0]
   680 <BR><B>HSPACE</B>=int [clamped: >= 0]</UL>
   681 </UL>
   682 <B>NOEBMED</B>
   683 <UL>Used when EMBED's are disabled. It is a container for regular content
   684 that has no stylistic consequences (no line breaking, no style stack effect,
   685 etc.).</UL>
   686 <B>APPLET</B>
   687 <UL>Applet tags don't nest (there is a notion of current_applet). The open
   688 tag automatically closes an open applet tag.
   689 <BR>Attributes:
   690 <UL><B>ALIGN</B>=alignparam
   691 <BR><B>CODE</B>=string
   692 <BR><B>CODEBASE</B>=string
   693 <BR><B>ARCHIVE</B>=string
   694 <BR><B>MAYSCRIPT</B>
   695 <BR><B>NAME</B>=string [clamped: white space is stripped out]
   696 <BR><B>WIDTH</B>=value-or-pct [pct of right-left width; clamped: >= 1]
   697 <BR><B>HEIGHT</B>=value-or-pct [pct of window height; clamped >= 1]
   698 <BR><B>BORDER</B>=int [clamped: >= 0]
   699 <BR><B>HSPACE</B>=int [clamped: >= 0]
   700 <BR><B>VSPACE</B>=int [clamped: >= 0]</UL>
   701 If no width is provided:
   702 <UL>if a height was provided, use the height. Otherwise, use 90% of the
   703 window width if percentage widths are allowed, otherwise use a value of
   704 600.
   705 <BR>&nbsp;</UL>
   706 If no height is provided:
   707 <UL>if a width was provided, use the width. Otherwise, use 50% of the window
   708 height if percentage widths are allowed, otherwise use a value of 400.</UL>
   709 If the applet is hidden, then the widht/height get forced to zero.</UL>
   710 <B>PARAM</B>
   711 <UL>The param tag is supported when contained by the APPLET tag or the
   712 OBJECT tag. It has no stylistic consequences. The attribute values from
   713 the tag are passed to the containing APPLET or OBJECT. Note that <FONT COLOR="#0000FF">/PARAM
   714 == PARAM</FONT>.
   715 <BR>Attributes:
   716 <UL><B>NAME</B>=string [clamped: white space is stripped out]
   717 <BR><B>VALUE</B>=string [clamped: white space is stripped out]</UL>
   718 White space being stripped is done as follows: leading and trailing whitespace
   719 is removed. Any embedded whitespace is left alone except if it's a non-space
   720 whitespace in which case it is removed.</UL>
   721 <B>OBJECT</B>
   722 <UL>The open tag pushes an object onto the object stack. The close tag
   723 pops from the object stack. I don't understand how the data stuff works.
   724 <BR>Attributes:
   725 <UL><B>CLASSID</B>=string (clsid:, java:, javaprogram:, javabean: are the
   726 supported prefixes; maybe it's a url if no prefix shown?)
   727 <BR><B>TYPE</B>=string (a mime type)
   728 <BR><B>DATA</B>=string (data: prefix mentions a url)</UL>
   729 There are more attributes that depend on the type of object being embedded
   730 in the page. If the object is a java bean (?) then the applet parameters
   731 are supported:
   732 <UL>CLASSID
   733 <BR>HIDDEN
   734 <BR>ALIGN
   735 <BR>CLASSID (instead of CODE)
   736 <BR>CODEBASE
   737 <BR>ARCHIVE
   738 <BR>MAYSCRIPT
   739 <BR>ID (applets use NAME)
   740 <BR>WIDTH
   741 <BR>HEIGHT
   742 <BR>BORDER
   743 <BR>HSPACE
   744 <BR>VSPACE</UL>
   745 </UL>
   746 <B>MAP</B>
   747 <UL>The open tag automatically closes an open map (maps don't nest). There
   748 is no stylistic consequence of the map nor does it provide any visible
   749 presentation in the normal layout case (an editor would do something different).
   750 The map can be declared anywhere in the document.
   751 <BR>Attributes:
   752 <UL><B>NAME</B>=string [clamped: white space is stripped out]</UL>
   753 </UL>
   754 <B>AREA</B>
   755 <UL>Does nothing if there is no current map or the tag is a close tag.
   756 <BR>Attributes:
   757 <UL><B>SHAPE</B>=default | rect | circle | poly | polygon
   758 <BR><B>ALT</B>=string [clamped: newlines are stripped]
   759 <BR><B>COORDS</B>=coord-list
   760 <BR><B>HREF=</B>url
   761 <UL><B>TARGET</B>=target (only if HREF is specified)</UL>
   762 <B>SUPPRESS</B></UL>
   763 </UL>
   764 <B>SERVER</B>
   765 <UL>A container for server-side javascript. Not evaluated by the client
   766 (parsed and ignored). Note: The navigator parser doesn't expand entities
   767 in a <B>SERVER </B>tag.</UL>
   768 <B>SPACER</B>
   769 <UL>Close tag is ignored. Open tag provides whitespace during layout: <B>TYPE</B>=line/vert/vertical
   770 causes a conditional soft line break and then adds <B>SIZE </B>to the Y
   771 layout coordinate. <B>TYPE</B>=word causes a conditional soft word break
   772 and then adds <B>SIZE </B>to the X layout coordinate. <B>TYPE</B>=block
   773 causes <FONT COLOR="#DD0000">blockish </FONT>layout stuff to happen.
   774 <BR>Attributes:
   775 <UL><B>TYPE</B>=line | vert | vertical | block (default: word)
   776 <UL><B>ALIGN</B>=alignparam (these 3 params are only for <B>TYPE</B>=block)
   777 <BR><B>WIDTH</B>=value-or-pct
   778 <BR><B>HEIGHT</B>=value-or-pct</UL>
   779 <B>SIZE</B>=int [clampled: >= 0]</UL>
   780 </UL>
   782 <H3>
   784 <HR ALIGN=LEFT WIDTH="50%"></H3>
   785 <B>SCRIPT</B>
   786 <UL>Note: The navigator parser doesn't expand entities in a SCRIPT tag.
   787 <BR>Attributes:
   788 <UL><B>LANGUAGE</B>=LiveScript | Mocha | JavaScript1.1 | JavaScript1.2
   789 <BR><B>TYPE</B>="text/javascript" | "text/css"
   790 <BR><B>HREF</B>=url
   791 <BR><B>ARCHIVE</B>=url
   792 <BR><B>CODEBASE</B>=url
   793 <BR><B>ID</B>=string
   794 <BR><B>SRC</B>=url</UL>
   795 </UL>
   796 <B>NOSCRIPT</B>
   797 <UL>Used when scripting is off or by backrev browsers. It is a container
   798 that has no stylistic consequences.</UL>
   800 <H3>
   802 <HR ALIGN=LEFT WIDTH="50%"></H3>
   803 <B>FORM&nbsp;</B>
   804 <UL>Attributes:
   805 <UL><B>ACTION</B>=href
   806 <BR><B>ENCODING</B>=string
   807 <BR><B>TARGET</B>=string
   808 <BR><B>METHOD</B>=get | post</UL>
   809 </UL>
   810 <B>ISINDEX&nbsp;</B>
   811 <UL>This tag is a shortcut for creating a form element with a submit button
   812 and a single text field. If the PROMPT attribute is not present in the
   813 tag then the value used is <B>"This is a searchable index. Enter search
   814 keywords:"</B>.
   816 <P>Attributes:
   817 <UL><B>PROMPT</B>=string
   818 <BR><B>ACTION</B>=href
   819 <BR><B>ENCODING</B>=string
   820 <BR><B>TARGET</B>=string
   821 <BR><B>METHOD</B>=get | post</UL>
   822 </UL>
   823 <B>INPUT&nbsp;</B>
   824 <UL>Attributes vary according to type:
   825 <UL><B>TYPE</B>= text | radio | checkbox | hidden | submit | reset | password
   826 | button | image | file | jot | readonly | object
   827 <BR><B>NAME</B>= string
   828 <BR>&nbsp;</UL>
   829 <B>TYPE</B>=image
   830 <UL>attributes are from the IMG tag (!)</UL>
   831 <B>TYPE</B>= text | password | file
   832 <UL>font style is forced to fixed
   833 <BR><B>VALUE</B>= string
   834 <BR><B>SIZE</B>= int (clamped; >= 1)
   835 <BR><B>MAXLENGTH</B>= int (not clamped!)</UL>
   836 <B>TYPE</B>= submit | reset | button | hidden | readonly
   837 <UL><B>VALUE</B>=string; default if no value to the attribute varies according
   838 to the type:
   839 <UL><B>submit</B> -> "Submit Query"
   840 <BR><B>reset</B> -> "Reset"
   841 <BR>others -> "&nbsp; " (2 spaces)
   842 <BR>Note also that the value has newlines stripped from it</UL>
   843 <B>WIDTH</B>=int (clamped >=0 &amp;&amp; &lt;= 1000) (only for submit,
   844 reset or button)
   845 <BR><B>HEIGHT</B>=int (clamped >=0 &amp;&amp; &lt;= 1000) (only for submit,
   846 reset or button)</UL>
   847 <B>TYPE</B>=radio | checkbox
   848 <UL><B>CHECKED</B> (flag - if present then set to true)
   849 <BR><B>VALUE</B>= string (the default value is "on")</UL>
   850 </UL>
   851 <B>SELECT&nbsp;</B>
   852 <UL>Attributes:
   853 <UL><B>MULTIPLE</B> (boolean)
   854 <BR><B>SIZE</B>= int (clamped >= 1)
   855 <BR><B>NAME=</B> string
   856 <BR><B>WIDTH</B>= int (clampled >= 0 &amp;&amp; &lt;= 1000)
   857 <BR><B>HEIGHT</B>= int (clamped >= 0 &amp;&amp; &lt;= 1000; only examined
   858 for single entry lists (!multiple || size==1))</UL>
   859 </UL>
   860 <B>OPTION&nbsp;</B>
   861 <UL>Lives inside the SELECT tag (ignored otherwise).
   862 <BR>Attributes:
   863 <UL><B>VALUE</B>=string
   864 <BR><B>SELECTED</B> boolean</UL>
   865 </UL>
   866 <B>TEXTAREA&nbsp;</B>
   867 <UL>Attributes:
   868 <UL><B>NAME</B>=string
   869 <BR><B>ROWS</B>=int (clamped; >= 1)
   870 <BR><B>COLS</B>=int (clamped; >= 1)
   871 <BR><B>WRAP</B>= off | hard | soft (default is off; any value which is
   872 not known turns into soft)</UL>
   873 </UL>
   874 <B>KEYGEN&nbsp;</B>
   875 <UL>Attributes:
   876 <UL><B>NAME</B>=string
   877 <BR><B>CHALLENGE</B>=string
   878 <BR><B>PQG</B>=string
   879 <BR><B>KEYTYPE</B>=string</UL>
   880 </UL>
   882 <H3>
   884 <HR ALIGN=LEFT WIDTH="50%"></H3>
   885 <B>BASEFONT&nbsp;</B>
   886 <UL>Sets the base font value which +/- size values in FONT tags are relative
   887 to.
   888 <BR>Attributes:
   889 <UL>SIZE=+ int | - int | int (just like FONT)</UL>
   890 </UL>
   892 <H2>
   894 <HR WIDTH="100%">Unsupported</H2>
   895 <B>NSCP_CLOSE, NSCP_OPEN, NSCP_REBLOCK, MQUOTE, CELL, SUBDOC, CERTIFICATE,
   896 INLINEINPUTTHICK, INLINEINPUTDOTTED, COLORMAP, HYPE, SPELL, NSDT</B>
   897 <UL>These tags are unsupported because they are used internally by netscape
   898 and are never seen in real content. If somebody does use them between 4.0
   899 and magellan, tough beans. We never documented them so they lose.</UL>
   901 </BODY>
   902 </HTML>

mercurial