Page 1 of 1

Generation of RNC gives error message

Posted: Sat Aug 28, 2010 7:21 am
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

Re: Generation of RNC gives error message

Posted: Mon Aug 30, 2010 9:36 am
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

Re: Generation of RNC gives error message

Posted: Mon Aug 30, 2010 1:09 pm
by acmuller
Radu: OK, we're in business now. Thanks for the fast help.

Chuck