While LXP performs programmatic tasks, one of the aims of LXP is to achieve these tasks without having to change the
general syntax that one uses when putting together HTML (or XHTML) mark-up. On the server, an LXP document appears to be a
normal HTML file with some unfamiliar
tags
.
Here is an introductory example of a simple LXP document:
<lxp>
<dock type="init">
<include src="parts/init.lxp" />
</dock>
<include src="parts/head.html" />
<h1>Welcome</h1>
<hr width="400">
<if lxp.authenticated='t'>
Welcome to my webpage, <putcookie name="user" />
</if>
<else>
<strong>Please login.</strong>
<include src="parts/login.lxp" />
</else>
<include src="parts/foot.html" />
</lxp>