1. In map.xdb, a reference to MapScript.xdb of the form
<MapScript href="MapScript.xdb#xpointer(/Script)"/>2. In MapScript.xdb, a reference to MapScript.lua of the form
<?xml version="1.0" encoding="UTF-8"?><Script> <FileName href="MapScript.lua"/> <ScriptText/></Script>3. In MapScript.lua, the corresponding code.