Implemented all the facilities for retrieving the resulting composition
in both XML and JSON.