droyo / go-xml

utility and code-generation libraries for XML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 😞