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 [1] http://docs.basex.org/wiki/Validation_Module#RelaxNG_Validation
Hi Andy,
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?
True, that's indeed inconsistent. And it's a bit tricky, because the second argument can be both a file path or the schema string, and I believe we have no easy way to find out what the supplied argument is supposed to be. For XSD and DTD, and for the input argument, things are easier, because XML always starts wirth an angle bracket.
In the latest snapshot [1], I am now interpreting the argument as file path. If the path cannot be successfully resolved, it is interpreted as schema string. It's not an ideal solution (better ideas are welcome), but at least the test should be unambiguous.
Thanks, Christian
basex-talk@mailman.uni-konstanz.de