Attributes need a namespace
leth opened this issue · comments
In tracking down a validation error I've just discovered that XML attributes need a to specify namespace! I thought I knew XML pretty well, but this was news to me!
For example, in <Foo xmlns="http://bar/" hello="world" />
the hello
attribute does not have a namespace.
If we generated this strucure from a schema we were probably expecting it to use the namespace in which it was defined, so we'd need something like <bar:Foo xmlns:bar="http://bar/" bar:hello="world" />
Ah, this will probably be blocked by golang/go#9519 😞
Aha, this was the explanation I was looking for: https://stackoverflow.com/questions/16809481/what-is-the-form-attribute-in-xml-schemas-actually-good-for