Bugzilla – Bug 9
allow spaces in names
Last modified: 2009-04-18 23:22:32 PDT
See discussion here: https://collada.org/public_forum/viewtopic.php?t=514 At the moment, name attribute in node and rigid_body is of type NCName. This means it cannot contain spaces. This requirement is too strict, and not necessary in my opinion. Can we change the name to be generic string?
In XML Schema, strings can have all manner of characters and whitespace including newlines, carriage returns, vertical tabs, etc. etc.. Perhaps the best data type for name attributes is xs:token? A token is a normalized string that may contain a single space between words.
Consider loosening the constraints for 1.5 release.
Reopening for consideration in 1.5.0 per comment 2. (Same as internal bug 532: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=532 )
Ellen what is the impact on the spec editing if we change all name attribute types in the schema from xs:NCName to xs:token? We need a spec bug to block on this too.
I can do it pretty quickly. I will do so.
Note that the schema contains a redefinition: <xs:simpleType name="token"> <xs:restriction base="xs:token"/> </xs:simpleType> so we should use "token" instead of "xs:token". The larger question is, "xs:token" is widely used within the schema. Should any others (or all) be changed to "token"? (If so, maybe this should be a different bug.)
Fixed.
Verified that all "name" attributes are xs:token in 1.5.0 except in unit. Opening separate Bug 146 for next release.