DITA and XMetaL Discussion
XMetaL Community Forum › DITA and XMetaL Discussion › Conref from Specialized Topics
severin.foreman June 15, 2009 at 7:02 pm
Conref from Specialized TopicsJune 15, 2009 at 7:02 pmParticipants 2Replies 3Last Activity 13 years, 9 months ago
XMetaL 5.5 Author EE
I have created local DTD shells for all the major DITA topic types. Today, I decided to specialize an element (navtitle). I updated the relevant ENT, MOD and DTD files.
XMetaL will open topics without error, except that it will not resolve existing conrefs . However, conrefs do resolve during OT processing. When I select Reuse > Insert Element with Content Reference, the dialog box displays “no file selected” for the current file and for any file that I try to select which points to a local DTD shell. If I have a topic that uses a local shell, and I try to conref content from a topic that uses a base DTD, XMetaL throws the following exception: “The referenced element may contain content from domains that are not allowed in the referencing element.”
I'm sure whatever is causing that error is at the heart of the issue. Any pointers would be greatly appreciated.
Severin Foremanseverin.foreman June 15, 2009 at 8:33 pm
Reply to: Conref from Specialized TopicsJune 15, 2009 at 8:33 pm
I think I found the issue. My shell copy of topicDefn.ent contained the following entity:
“-//OASIS//ENTITIES DITA Common Elements//EN”
The problem with the entity is that I don't have a copy of commonElements.ent in my local shells folder. When I changed the public and system ID to match the my local shells (as declared in catalog-dita.xml), all conrefs resolved and I can set new ones using the Reuse menu commands.
Well, I still cannot set a conref from a shell topic to a base DTD topic. This is not a major issue, since everyone at our company is required to create topics that use the local shells, but I would think that topics based on specialized or configured DTDs should be able to conref content from topics based on base DITA DTDs.
So I will say it again, but much less urgently this time. Any pointers would be greatly appreciated. In the meantime, I will search my local shell files for broken references like the one above.
Sevseverin.foreman June 16, 2009 at 5:54 pm
Reply to: Conref from Specialized TopicsJune 16, 2009 at 5:54 pm
I have more to report and still have questions, but my questions are evolving. After comparing the domains in the base DITA DTDs with the domains in my local shell DTDs, I found that my local shells did not include the Utilities domain.
I was able to create a conref from a base DTD topic to a shell DTD topic after:
1) Adding the Utilities domain back into my shells
2) Removing the base attribute specializations from my shells
Without knowing exactly what XMetaL is doing in the way of validation, it appears that it will not allow conrefs between any topics where the included domains are not identical. Since domain elements are specializations of base elements, I would think that XMetaL should not require that I include any domains in my shell DTDs. When I created my shells, I followed Eliot Kimber's popular specialization tutorial. Step 2-2 advises removing domains from your shell DTD as a good way of limiting the elements available. ([url=http://www.xiruss.org/tutorials/dita-specialization/dita_specialization_tutorial/topic-specialization-step-2-2.html]http://www.xiruss.org/tutorials/dita-specialization/dita_specialization_tutorial/topic-specialization-step-2-2.html[/url])
I have to admit, though, that I'm not sure how XMetaL should handle it if I conref'ed a paragraph that contained an imagemap into a topic where the DTD does not include that element.
But as for my domain attribute specializations of @base, again I cannot see why that would prevent me conref'ing content from base DTD topics into my shell DTD topics. My shell DTDs include all the domains that the base DTDs do, and more. So why limit my ability to conref from base to shell? If
I'm wrong about XMetaL requiring identical domains for content references, I'll be glad to hear it. There is always a chance that I have not implemented my domain attribute specializations correctly.
SeverinDerek Read June 18, 2009 at 5:51 pm
Reply to: Conref from Specialized TopicsJune 18, 2009 at 5:51 pm
We do impose a limitation for conrefs between different domains (as per this portion of the spec http://docs.oasis-open.org/dita/v1.1/OS/archspec/conref.html), but we don't think that's your issue and the error you are seeing may be raised for some other reason.
I've discussed this with “XMetaLOldTimer” and we suspect you have changed the DTDs (you don't mention that). You do mention the file catalog-dita.xml which is the catalog used by the DITA OT in the OT's root folder. If you only modified this file then that explains why the DITA OT would be working. XMetaL doesn't use that catalog, so you need to ensure the DITA DTD files under the
AuthorDITADITA_OT_DTD folder have the same changes.
If you have modified the base topic types (e.g. topic.mod) and/or entities AND not changed the PUBLIC or SYSTEM ids, you will likely need to make adjustments to
AuthorRulesdita.socand AuthorDITAXACsdita_xac_catalog.xmlfiles as well. These are the catalogs that XMetaL and the DITA features rely upon for resolution of DTD and entity files.
When no changes have been made to the base topic types themselves the procedure outlined in our Help for “Working with DITA Specializations” should do all of that work automatically. However, it needs to make assumptions and one of the assumptions is that the base files have not been modified.
Note that all of this assumes that a CMS is not involved. When a CMS is involved you need to follow the procedure outlined (or demoed) by the CMS integration vendor. In some cases (as with Documentum) the DTD needs to be flattened and in other cases there may be other requirements.
- You must be logged in to reply to this topic.