[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Ambiguity problems caused by ID/IDREF
Dear colleagues, The RNG schema for ODF 1.0 is "correct" (as defined in ISO/IEC 197575-2), but is it not compatible (as defined in "RELAX NG DTD Compatibility"), as Alex correctly pointed out. For example, consider the form:id attribute. It is defined as ID. After schema normalization (as defined in ISO/IEC 197575-2), this attribute will occur in the define element for <form:text>. That define element competes with the definition of anyElements. However, the definition of anyElements does not specify the attribute form:id as an ID. Therefore, the condition in the last bullet of the first itemized list of Section 3 of "RELAX NG DTD Compatibility" is not satisfied. One way to solve this problem is to replace mathMarkup = (attribute * { text } | text | element * { mathMarkup })* by mathMarkup = (attribute * - (anim:id | draw:control | draw:end-shape | draw:id | draw:shape-id | draw:start-shape | form:id | presentation:master-element | smil:targetElement | text:change-id | text:id) { text } | attribute anim:id { ID } | attribute draw:control { IDREF } | attribute draw:end-shape { IDREF } | attribute draw:id { ID } | attribute draw:shape-id { IDREF } | attribute draw:start-shape { IDREF } | attribute form:id { ID } | attribute presentation:master-element { IDREF } | attribute smil:targetElement { IDREF } | attribute text:change-id { IDREF } | attribute text:id { ID } | text | element * { mathMarkup })* and replace anyAttListOrElements = attribute * { text }*, anyElements by anyAttListOrElements = attribute * - (anim:id | draw:control | draw:end-shape | draw:id | draw:shape-id | draw:start-shape | form:id | presentation:master-element | smil:targetElement | text:change-id | text:id) { text }*, (attribute anim:id { ID } | attribute draw:control { IDREF } | attribute draw:end-shape { IDREF } | attribute draw:id { ID } | attribute draw:shape-id { IDREF } | attribute draw:start-shape { IDREF } | attribute form:id { ID } | attribute presentation:master-element { IDREF } | attribute smil:targetElement { IDREF } | attribute text:change-id { IDREF } | attribute text:id { ID })*, anyElements After this change, jing does not complain. (But remember that jing does not check a:defaultValue.) You might want to be more specific. For example, the definition of mathMarkup can be: mathMarkup = attribute local:* { text } | attribute xlink:href { text } | attribute xlink:type { text } | text | element mml:* { mathMarkup })* where namespace local = "" namespace mml = "http://www.w3.org/1998/Math/MathML" -- MURATA Makoto (FAMILY Given) <EB2M-MRT@asahi-net.or.jp>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]