AndroMDA is an open source tool that uses UML to generate code. It comes with various technology cartridges, each of which can be used to transform UML to a technology specific implementation. For example, using the same UML, and two different technology cartridges, it is possible to generate either an EJB based application or a hibernate based App.
We are currently working on a UML to XSD cartridge.