In xsdgen/xsdgen.go, any restrictions on types aren't given special treatment, only a simple comment is added to the resulting type. This should be changed to proper Mashal/Unmarshal methods so full XML validation is possible.