metaleap/go-xsd — pull request #11 by lobatt (2014-10-02 18:55:26+00:00)
Title: Fix for issue #9

the problem is that the protocol header is not included in the
loadedschemas but in the tmpUrl. stripping the header then it works fine.

Also included some clean up for previous commit, but the fix focused on the following part:

-	if sd = loadedSchemas[tmpUrl]; sd == nil {
+	var ok bool
+	var toLoadUri string
+	if pos := strings.Index(tmpUrl, protSep); pos >= 0 {
+	toLoadUri = tmpUrl[pos+len(protSep):]
+	} else {
+	toLoadUri = tmpUrl
+	}
+	if sd, ok = loadedSchemas[toLoadUri]; !ok {