About Sitellite       Screenshots       Downloads       Forge      Documentation       Community       Support

You are here: Home / XT Reference

XT Reference

Troubleshooting

Sometimes you might get stuck on an XTE expression and you'll want to see exactly what a path object contains or some PHP code returns. In this case, the <xt:exec> command is your best friend. To find the value of the cgi/test path, the following would work:

<xt:exec value="php: print_r (cgi.test)" />

This will print the value immediately to the browser, and not append it to the XT output. For silent debugging, you might create a function that logs such values to a file. In this case you could simply replace the print_r() call with the name of your custom logging function. For example:

<xt:box
	name="cms/services/log"
	transition="cgi/test"
	message="${cgi/test}"
/>

In the example, we also added the string 'cgi/test' as a parameter to the logger() function, so that when the value is printed to the file, it is associated with an appropriate name to make it easier to find in larger files.

Variable Scope

Currently, the scope of objects and variables is not like one would expect in a standard programming language. When an object is modified inside of a command construct, such as a loop or a condition, the modification is only set inside that construct, and not retained beyond it.

This is a limitation that will likely change in an upcoming release, but for now it exists and should be documented.

Influences

XT was inspired by a number of different technologies, including:



Page 1: Design Goals
Page 2: A Complete Example
Page 3: Command Reference
Page 4: Troubleshooting

Members

Note: You can use your SitelliteForge.com account here and vice versa.

Username

Password

Forgot your password?

Not a member? Click here to register

Sitellite 5 Beta


Copyright © 2009, SIMIAN systems Inc.
All rights reserved. Privacy policy
Some of the icons on this site were created by the Gnome Project.