Creole implementation Based on: https://www.princexml.com/howcome/2007/xtech/papers/output/0077-30/index.xhtml