Fixed handling of composite resources, allowing xa-datasources

Fix for #45, with test case + documentation example update.