You can actually loop through `namespace.fields` in the same way that you loop through `xblock.fields`.