Cleaned up XSLT edittool for PHP