schemaSpec/@prefix is defined as
"" | data.name
Why, I wonder? Doesn't seem like putting a colon in a prefix is a good idea. (At least, not for RELAX NG schemas, in which every single prefixed pattern would generate an "is not a valid local name" error.)
Ah, look! The ﹤remarks﹥ for this attribute say "Colons, although permitted inside the value, will cause an invalid schema to be generated". Well, at least it is correctly documented.
But wouldn't it be better to just use
"" | xs:NCName
as the definition? (Or a new "data.localName" if we really insist on indirection.)