may be interested to hear that it is possible to load and use the classes of XP natively within Stubbles. Read on for an example how to do that.
The following little example uses a so called foreign class loader that is responsible for a given namespace, in this case net.xp_framework. This class loader is registered within the default Stubbles class loader. After that, all classes that reside in the namespace where the foreign class loader is responsible for will be loaded via this class loader. Here we load the class text.String (from xp-rt-5.3.1.xar) and use it.
require 'path/to/config/php/config.php';
require stubConfig::getLibPath() . DIRECTORY_SEPARATOR . 'stubbles.php';
stubClassLoader::load('net.stubbles.util.ext.stubXPClassLoader');
stubClassLoader::registerForeignClassLoader(new stubXPClassLoader());
stubClassLoader::load('net.xp_framework.text.String');
$string = new String('foo');
echo $string->toString();
The only requirement to bring this to work is to download the current version of XP, and to put the lang.base.php and the xp-rt-[VERSION].xar into the lib-directory of Stubbles.