clone from http://x-framework.googlecode.com/svn/trunk/