preparation for typeandsafety

* change xml and scheme
* change xml.py
* add log api
* add validate command to frontend
*