<?xml version = '1.0' encoding = 'windows-1252'?>
<notes>
  <node>Features
    <node>Recognized and indented brackets and parenthesis in ASP/JSP/PHP, Javascript.</node>
    <node>XML tags and HTML &lt;table&gt;, &lt;tr&gt;, &lt;td&gt; structural tags and &lt;select&gt; are indented,
      tags and attributes can be transformed to upper/lowercase.</node>
    <node>IF, ELSE, FOR, WHILE, SUB structures indented in VBScript mode, in both server code and &lt;script&gt;</node>
    <node>SSI, &lt;pre&gt;, attribute/code quotations and apostrophes are preserved.</node>
    <node>Newlines and whitespaces preserved, truncated multiple ones. Lines are not split/concatenated.</node>
    <node>Other languages are easy to support (TCL, Scheme).</node>
    <node>Flexible for subtemplates etc - no html/code/javascript correctness checks
      are performed, except for unpaired code and javascript parenthesis/brackets.</node>
  </node>
  <node>Limitations and restrictions:
    <node>All mentioned limitations or "edge" features tested with IE 6.0, Opera 7.11 and Netscape 4.61.</node>
    <node>ASP/JSP/PHP in html comment not processed.</node>
    <node>Support for more VBScript structural keywords and comments easy is to do.</node>
    <node>&lt;script "quotation" or 'apostrophe'&gt; tag (no script itself) and &lt;pre "q" 'ap'&gt; are transformed to upper/lower case as whole
      and multiple spaces are not truncated. Browsers accept LANGUAGE attribute case insensitively.
      When html tags are transformed to upper/lowercase, OnClick and other Javascript-related attribute names are transformed as well;
      this doesn't make any harm for mentioned browsers.</node>
    <node>&lt;script/&gt;, and &lt;script&gt; with '&gt;' in quotation/apostrophe or with &lt;% %&gt; and are handled incorrectly - they leave indentation open. 
      The same goes for &lt;pre/&gt; and &lt;pre&gt;. This isn't normally used. (It can be solved by adding other lexical states.)</node>
    <node>&lt;table/&gt;, &lt;tr/&gt;, &lt;td/&gt;, &lt;select/&gt; are handled correctly.</node>
    <node>VBscript possibly multiline keywords (END IF, END SUB) are put on the same line.</node>
  </node>
  <node>Challenges:
    <pre>
if( ) {%&gt;
	&lt;html-to-be-indented-to-minimum-of-both-parts&gt;
&lt;% } else { %&gt;
	&lt;html-----&gt;
&lt;% } %&gt;

if/while ( condition(new ParentClass() { anonymous class code with possibility of if statement }
							)
	)
</pre>
  </node>
  <node>Programmer's notes:
    <node>Static objects
      <node>are not synchronized because of token efficiency - mostly 1 token == 1 char. Should there be a need for
        extensive multithreading, token state stack and other often used static objects should be added to TokenManager class and
        synchronized on.</node>
    </node>
    <node>Extensibility
      <node>I chosed special tokens and lexical states. This reflects variability of ASP/JSP/PHP "flow" in a flat manner rather than
        covering it by a BNF net. While state stack is quite straight-forward, additional tricks are used for issues like &lt;tr/&gt;.
        Quite a high-traffic but not huge token state-space is combined with stack.</node>
    </node>
  </node>
</notes>