Generation of RNC gives error message

Having trouble installing Oxygen? Got a bug to report? Post it all here.
acmuller
Posts: 2
Joined: Sat Aug 28, 2010 7:04 am

Generation of RNC gives error message

Post by acmuller »

I am trying to use oXygen's schema generator to create a RelaxNG compact schema file. The original DTD is valid, and the XML file is valid. But when I generate the schema, whether by conversion from my original DTD, or from the DTD generated from Documents > "save structure", I get the error message:

[jing] missing "start" element

My documents to not have any element named <start>, and I don't know why they should, so I am baffled by this message.

The DTD in question is at:

http://www.acmuller.net/download/dealt.dtd

Regards,

Chuck
Radu
Posts: 9443
Joined: Fri Jul 09, 2004 5:18 pm

Re: Generation of RNC gives error message

Post by Radu »

Dear Chuck,

The main RelaxNG file (compact or XML syntax) needs to have a start pattern which declares which element is the root element of the XML file.
This is not required in DTD so when passing from the DTD to RNC the Trang converter (which is used by Oxygen) has no way of knowing which of the elements is intended to be the root element.
All you have to do is to add at the end of the RNC file the following line:

Code: Select all


start = dealt
Then you will get another error:

Code: Select all


conflicting ID-types for attribute.....
Here is a discussion about why this usually happens:
http://lists.xml.org/archives/xml-dev/2 ... 00067.html

Basically in the <any> pattern you will have to manually exclude the id attributes defined in the schema like:

Code: Select all


any =
(element * {
attribute * - (ID | lang | xml:id) { text }*,
any
}
| text)*
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
acmuller
Posts: 2
Joined: Sat Aug 28, 2010 7:04 am

Re: Generation of RNC gives error message

Post by acmuller »

Radu: OK, we're in business now. Thanks for the fast help.

Chuck
Post Reply