Skip to content

Conflict with xenoData when introducing elements in new namespaces in ODD customizations #2837

Description

@ebeshero

I discovered this problem while working with students to customize the CBML ODD (for Comic Book Markup Language).

The issue appears when:

  • we introduce elements in a new namespace (e.g. http://www.cbml.org/ns/1.0)
  • we wish to be checking IDs/IDREFs (with this setting turned on in oXygen)

The output Relax NG in XML syntax in these conditions generates this error on xenoData:

<define name="anyElement_xenoData_1">
      <element>
         <anyName>
            <except>
               <nsName ns="http://www.tei-c.org/ns/1.0"/>
               <name ns="http://www.tei-c.org/ns/Examples">egXML</name>
            </except>
         </anyName>
         <zeroOrMore>
            <attribute>
               <anyName/>
            </attribute>
         </zeroOrMore>
         <zeroOrMore>
            <choice>
               <text/>
               <ref name="anyElement_xenoData_1"/>
            </choice>
         </zeroOrMore>
      </element>
   </define>

The Relax NG error is on the line here, and reads, “conflicting ID-types for attribute “id” from namespace “http:// www.w3.org/XML/1998/ namespace” of element “panel” from namespace “http:// www.cbml.org/ns/1.0”. (When I experimented with removing the cbml:panel definition in the ODD, the error would emerge again on this definition of anyElement_xenoData_1, just mentioning a different CBML element.)

To temporarily solve the problem, simply removing <xenoData> from the teiheader module entirely, or modifying <xenoData> in an elementSpec to exclude the CBML namespace worked. So this is my current patch (thanks to @raffazizzi's advice on the TEI Slack):

<elementSpec ident="xenoData" mode="replace">
    <content>
        <anyElement except="http://www.cbml.org/ns/1.0"/>
    </content>
</elementSpec>

However, we think this should not be necessary. Is there a solution to the problem that doesn't compel ODD customizers to modify the <xenoData> element defintion when we introduce elements in custom namespaces? The ANY or anyElement in our content model for <xenoData> seems to be the problem. @raffazizzi suggests in Slack that perhaps <anyElement> can be adjusted by the ODD processor to exclude new namespaces introduced in an ODD customization?

Here is my customization of CBML for reference on this ticket. (It includes the patchwork to revise <xenoData> in an elementSpec at the very end of the file (line 376).

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions