private void WriteUnparsedTag(HtmlTag tag) { switch (tag.TagName) { case "%@": { // store directive for specialized parsing this.Directives.Append(tag.ToString()); break; } case "%!": { // analogous to static code, or JSP declarations // executed only on initialization of template // output from declarations are appended after the template this.Declarations.Append(tag.Content); break; } case "%#": // databinding expression { // unparsed expressions are emitted directly into JBST JbstUnparsedBlock code = new JbstUnparsedBlock(tag.Content); this.AppendChild(code); break; } case "%=": // inline expression { // expressions are emitted directly into JBST JbstExpressionBlock code = new JbstExpressionBlock(tag.Content); this.AppendChild(code); break; } case "%$": { // expressions are emitted directly into JBST JbstExtensionBlock code = new JbstExtensionBlock(tag.Content, this.path); this.AppendChild(code); break; } case "%": { // statements are emitted directly into JBST JbstStatementBlock code = new JbstStatementBlock(tag.Content); this.AppendChild(code); break; } case "%--": { // server-side comments are omitted even for debug break; } case "!--": { // HTML Comments are emitted directly into JBST JbstCommentBlock code = new JbstCommentBlock(tag.Content); this.AppendChild(code); break; } default: { // unrecognized sequences get emitted as encoded text this.AppendChild(tag.ToString()); break; } } }