Ambiguous content model: element particle <topic> appears in more than one place in the content model

Post here questions and problems related to editing and publishing DITA content.
EJB
Posts: 12
Joined: Mon Dec 13, 2010 12:59 pm

Ambiguous content model: element particle <topic> appears in more than one place in the content model

Post by EJB »

I've just created a new project and copied over some stylesheets from an old project to process my DITA transforms. I've probably done something daft, but using the same XML + XSLT + (in theory) XSD files I used in the old project, when I run any of the transforms I get the desired output, but then a failure message:

System ID: C:\Program Files\Oxygen XML Editor 13\frameworks\dita\DITA-OT\schema\base\xsd\topicMod.xsd
...
Engine name: Saxon-EE 9.4.0.3
Severity: fatal
Description: Error in complex type defined at line 125 of file:/C:/Program%20Files/Oxygen%20XML%20Editor%2013/frameworks/dita/DITA-OT/schema/base/xsd/topicMod.xsd: Ambiguous content model: element particle <topic> appears in more than one place in the content model
Start location: 125:0

The XML actually points explicitly to a copy of the DITA XSD files that is in a subfolder of where the XML lives, but Oxygen is still defaulting to its own copy, so maybe it ends up importing the same files twice.

I don't have this problem with the old project so presumably, there's a project setting somewhere that I need to change in Oxygen?
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Ambiguous content model: element particle <topic> appears in more than one place in the content model

Post by Radu »

Hi Emma,

The publishing is done using the DITA Open Toolkit as an external process.
In the DITA Open Toolkit installation folder, which probably in your case is:

C:\Program Files\Oxygen XML Editor 13\frameworks\dita\DITA-OT\

there is a file called catalog-dita.xml.

This XML Catalog contains mappings like:

Code: Select all

<system systemId="topic.xsd" uri="topic.xsd" xml:base="schema/technicalContent/xsd/"></system>
That catalog file is used to map references to schemas to certain resources.
So when the DITA OT parses one of your DITA XML topics which refer the XML Schema, the reference to the schema is passed through the catalog mentioned above and probably gets resolved to the XML Schemas which come by default with the DITA OT (in the folder DITA-OT/schema/.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
EJB
Posts: 12
Joined: Mon Dec 13, 2010 12:59 pm

Re: Ambiguous content model: element particle <topic> appears in more than one place in the content model

Post by EJB »

Hi Radu - sorry I was on holiday. I didn't make it clearer that I am using my own custom transforms, not the DITA Open Toolkit. So in theory at least, that should mean I am not using the catalog-dita.xml.

Maybe I just need to disable the Document Type Association for DITA for that project - would that force it to only use the schema it finds locally?
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Ambiguous content model: element particle <topic> appears in more than one place in the content model

Post by Radu »

Hi,

So you have your own DITA specialization, right?
Disabling the DITA document type would mean that you would lose all DITA-editing features when working in the Author page.

In the Oxygen Preferences->"Document Type Association" page you could edit both the "DITA" and "DITA Map" document types and in the Catalogs list remove the entry pointing to the catalog file.

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