Oracle Message ORA-19138 - The target type of a cast or castable expression must be an atomic type that is in the in-scope schema types and is not xs: NOTATION or xs: anyAtomicType, optionally followed by the occurrence indicator ?; otherwise a static error is raised

ERRORThe target type of a cast or castable expression must be an atomic type that is in the in-scope schema types and is not xs: NOTATION or xs: anyAtomicType, optionally followed by the occurrence indicator ?; otherwise a static error is raised
CAUSEAn error occurred during the processing of the XQuery expression.
ACTIONCheck the detailed error message for the possible causes.