Add support for literal documents and reorganize namespaces