Inserts the start of the XHTML output.
The following parameters are recognized:
Optional title (if provided, we will insert a <title> element.
Leave blank if you don't want standard JavaScript/CSS. Pass "xml" for XML valid JavaScript/CSS includes or "quirks" for non-valid JavaScript/CSS includes.
Fully qualified path to the source file used to render the page (like: "/var/www/html/nstwui/index.cgi").
Any optional attributes you would like to include on the <head> element.
Any optional attributes you would like to include on the <html> element.
This is intended to support the building of valid XHTML documents using JavaScript DOM methods and AJAX.
Example of using the macro:
@headBegin()
<title>Hello World</title>
@wuiHeadIncludes("xml")
@javascriptBegin()
@javascriptEnd()
@headEnd()
@bodyBegin()
@bannerNode()
<p>Hello World</p>
@footerNode()
@bodyEnd()
Assuming the com.ccg.macros.at.All
class is within your CLASSPATH and the
config/html.at macros file has been
generated (Hint: run make atmacros in the
wui directory), a developer should be able to
run the above example by copy/pasting from below:
[root@probe root]#java com.ccg.macros.at.All <<EOF@include("config/html.at",,"d")@headBegin() <title>Hello World</title> @wuiHeadIncludes("xml") @javascriptBegin() @javascriptEnd() @headEnd() @bodyBegin() @bannerNode() <p>Hello World</p> @footerNode() @bodyEnd()EOF
This macro is defined as:
@ifEqual("@param(1)","xml","<?xml@htmlAttr("version","1.0")@htmlAttr("encoding","UTF-8") ?>
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html@htmlAttr("xmlns","http://www.w3.org/1999/xhtml")@ifEqual("@param(4)",,," @param(4)")>
","<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'
'http://www.w3.org/TR/html4/loose.dtd'>
<html@ifEqual("@param(4)",,," @param(4)")>
")
<head@ifEqual("@param(3)","",," @param(3)")>@ifEqual("@param(0)",,,"
<title>@param(0)</title>")@ifEqual("@param(1)",,,"
@javascriptBegin()
//
// Record start of Page load time...
var beginDate = new Date();
var startTime = beginDate.getTime();
@javascriptEnd()
@htmlEntity("script",,"@htmlAttr("src","/nstwui/php/system/sysInfo.php?output=javascript")@htmlAttr("type","text/javascript")")
@wuiHeadIncludes("@param(1)")
@javascriptBegin()
// enable both the top/bottom nav bars and initialize document onload
NstWui.navBars(true, true);
NstWui.initialize();@ifEqual("@param(2)",,,"
NstWui.setSourceFile("@param(2)");")
@javascriptEnd()
")