Fix nesting namespaces, add bool attribute support.