Embedded Schematron rules in RNC files

Having trouble installing Oxygen? Got a bug to report? Post it all here.
solarian
Posts: 48
Joined: Thu Mar 12, 2009 10:27 pm

Embedded Schematron rules in RNC files

Post by solarian »

oXygen seems to be having trouble with embedded Schematron rules in .rnc files, but works fine with corresponding .rng files. The error it produces is:

Code: Select all

E [Schematron 1.5] org.xml.sax.SAXParseException: Content is not allowed in prolog.
As an example, try validating with embedded rules using the following:
<?oxygen SCHSchema="http://www.tei-c.org/release/xml/tei/cu ... ei_all.rng"?>
then:
<?oxygen SCHSchema="http://www.tei-c.org/release/xml/tei/cu ... ei_all.rnc"?>
(waiting a few seconds for it to get & parse the remote file of course)

At the same time Jing is happy to validate the .rnc file. The above error message doesn't help me to identify the problem, as it seems to be thinking there's a BOM in the way, which there isn't.
solarian
Posts: 48
Joined: Thu Mar 12, 2009 10:27 pm

Re: Embedded Schematron rules in RNC files

Post by solarian »

P.S. There is a second issue which is worth addressing separately. Using the above example file for reference, if (instead of using <?oxygen SCHSchema="..." ?>) we click on "External Validation..." and validate it as a RelaxNG Schema in compact syntax mode (remembering to select "Embedded schematron rules") then the error with the schematron validation is not reported, it simply fails silently. This would lead one to believe a given XML file validates when perhaps it doesn't.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Embedded Schematron rules in RNC files

Post by george »

Hi,

Embedded Schematron in Relax NG compact is not supported by oXygen.

Best Regards,
George
George Cristian Bina
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Embedded Schematron rules in RNC files

Post by george »

To complete my answer.
You can convert the RNC schema to RNG automatically so the workaround is to always use Relax NG in XML syntax when you want to use embedded Schematron.
The embedded Schematron rules are annotations for Relax NG so they have no impact in the Relax NG validation.

Best Regards,
George
George Cristian Bina
solarian
Posts: 48
Joined: Thu Mar 12, 2009 10:27 pm

Re: Embedded Schematron rules in RNC files

Post by solarian »

Thanks for pointing out that Schematron is not supported when embedded in Relax NG compact (and it is perfectly easy to convert to XML syntax, so this is no problem for me at all). However, I think it would be a good idea to make this clear within oXygen and in the User Manual. At the moment, both the manual and the program itself imply that embedded Schematron is supported.

Best wishes,

Ian
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Embedded Schematron rules in RNC files

Post by george »

Dear Ian,

We will update the user interface and we will try to make that clear also from the user manual.

Thank you,
George
George Cristian Bina
Post Reply