Check for valid CAP URIs.
Allow URI:LIT:
Minor fixes with error reporting.