Is there an issue with compact RelaxNG compact validation where the schema is supplied as a xs:string, containing the resource in its string representation [1]?
let $rnc:="start = element book { page+ } page = element page { text }"
return validate:rng(<book><page/></book>,$rnc,true())
Error:
[FODC0002] Resource .../start = element book { page+ } page = element page { text }' does not exist.
If the schema is not XML It looks like it is always treating it as a file path.
/Andy