RelaxNG (compact) validation

315 Views Asked by At

I have two RelaxNG file (fileA.rnc and fileB.rnc) within the Database. fileA.rnc is the main schema which has included fileB.rnc with syntax:

include "fileB.rnc"

I want to validate my XML input with fileA.rnc schema at the time of ingestion with the function validate:rng-report(). But, it seems that the Basex 8.6.4 is unable to resolve the include schema.

It gives me error:

[bxerr:BXVA0001] Validation failed: Resource "C:\Users\NAVIN~1.RAW\AppData\Local\Temp\fileB.rnc (The system cannot find the file specified)" not found.

It is looking included rnc in local drive instead of db. Is this a bug? Or, I am doing anything wrong.

Please have a look and share your inputs.

1

There are 1 best solutions below

0
On BEST ANSWER

The external Jing library is used for validating documents with RelaxNG, and Jing will try to include the referenced schema file. This is why your agenda files cannot be located if stored in the database. Instead, you'll have to move them to your local file system. If you still want to organize them in a central database instance, you can copy them from the database to a temporary file and delete them again after validation, all with the help of the File Module.