Embedded Schematron rules in RNC files
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 48
- Joined: Thu Mar 12, 2009 10:27 pm
Embedded Schematron rules in RNC files
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:
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.
Code: Select all
E [Schematron 1.5] org.xml.sax.SAXParseException: Content is not allowed in prolog.
<?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.
-
- Posts: 48
- Joined: Thu Mar 12, 2009 10:27 pm
Re: Embedded Schematron rules in RNC files
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.
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: Embedded Schematron rules in RNC files
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
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
-
- Posts: 48
- Joined: Thu Mar 12, 2009 10:27 pm
Re: Embedded Schematron rules in RNC files
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
Best wishes,
Ian
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service