JING says ODF 1.2 Schema has ID-Errors

This should cover W3C XML Schema, Relax NG and DTD related problems.
fsteimke
Posts: 41

JING says ODF 1.2 Schema has ID-Errors

Sun Aug 18, 2013 4:27 pm

Hi,

i want to play around with Open Document Format 1.2. So i got the OpenDocument-v1.2-os-schema.rng file from OASIS. Validation of this file gives following errors:

Code: Select all

a "data" or "value" pattern with non-null ID-type must occur as the child of an "attribute" pattern
Anfang: 11696:35
conflicting ID-types for attribute "id" from namespace "http://www.w3.org/XML/1998/namespace" of element "chart" from namespace "urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
Anfang: 18119:13
conflicting ID-types for attribute "id" from namespace "http://www.w3.org/XML/1998/namespace" of element "chart" from namespace "urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
Anfang: 11321:14

Problems disappear when i uncheck the "ID/IDREF check" option in XML PARSER/RELAX BG options of Oxygen. However, i'd like to know where the bug is, since the ODF Schema is distributed officially from OASIS. I would expect the OASIS guys to be very accurate. On the other hand, JING is the reference implementation for Relax NG. What happens here?

Oxygen 14.2 on Windows 7 (64 bit)

Sincerely,
Frank
Radu
Posts: 5749

Re: JING says ODF 1.2 Schema has ID-Errors

Wed Aug 21, 2013 2:11 pm

Hi Frank,

Actually in oxygen 15.1 we will also include the updated ODF 1.2 schema and we run into the same issue with the downloaded schema.
The issue has been discussed in the past, you can google for conflicting ID-types for attribute for example discussions can be found here:

http://blog.jclark.com/2009/01/relax-ng-and-xmlid.html
http://lists.xml.org/archives/xml-dev/200710/msg00067.html

Basically this pattern from the RNG schema:

Code: Select all

<define name="mathMarkup">....


allows any element inside it, including elements defined in the schema.
So basically we replaced inside this definition the:

Code: Select all

<anyName/>


with:

Code: Select all

               <anyName>
                  <except>
                     <nsName ns="urn:oasis:names:tc:opendocument:xmlns:animation:1.0"/>
                     <nsName ns="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"/>
                     <nsName ns="urn:oasis:names:tc:opendocument:xmlns:form:1.0"/>
                     <nsName ns="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"/>
                     <nsName ns="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"/>
                     <nsName ns="urn:oasis:names:tc:opendocument:xmlns:office:1.0"/>
                     <nsName ns="urn:oasis:names:tc:opendocument:xmlns:text:1.0"/>
                     <nsName ns="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"/>
                     <nsName ns="urn:oasis:names:tc:opendocument:xmlns:table:1.0"/>
                  </except>
               </anyName>


Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 0 guests