Hi Dharmendra,
The function validate:rng() seems to only accept a Relax NG *XML syntax* document as its 2nd argument. You can convert the rnc file to rng using trang and store it in the DB as a regular XML file.
Gerrit
On 6/21/17 8:20 AM, Dharmendra Singh wrote:
Hi all,
I have loaded the RNG schema using function db:store and also loaded the XML in the DB which has to be validated, but i am getting the error, below is my code:
let $binary := db:retrieve('onix','/relaxng/publishers-51cr.rnc') let $schema := bin:decode-string($binary) return let $input := db:open('onix') return validate:rng($input, $schema)
when i run this code i get the error invalid XML charcter(20)
so what i am doing wrong here.