This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The description of XQST0052 says: The type must be the name of a type defined in the in-scope schema types, and the {variety} of the type must be simple. I think it should just say ", and the type must be simple." See Bug 15807, I think the changes made to resolve that bug should have been extended to the error description.
Yes, it looks like the AtomicOrUnionType production was also not removed from the Cast section as planned. I will fix both issues, thanks.