Specialization Breaking the Maps Manager Title

Having trouble installing Oxygen? Got a bug to report? Post it all here.
bpopp
Posts: 37
Joined: Tue Nov 30, 2010 7:34 pm

Specialization Breaking the Maps Manager Title

Post by bpopp »

I'm having an issue where the Maps Manager can no longer parse a document's title if I specialize DITA's composite element (dita). I've created my own composite wrapper called fxdita which defines all my custom topic types (fxtopic, fxprocedure, etc.) If I use this wrapper, the maps manager no longer displays the file's title correctly, ie:

Image

Interestingly enough, if I remove the wrapper and just use one of my specialized topic types, the Maps Manager parses the title correctly.

Any help would be greatly appreciated!

Brian
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Specialization Breaking the Maps Manager Title

Post by sorin_ristache »

Hello,

Oxygen looks at the class attribute of the root element of the file referenced in the map and if it contains

Code: Select all

 topic/topic 

it will look at the class attribute of the first child of the root element. If it contains

Code: Select all

 topic/title 

or

Code: Select all

 topic/titlealts 

the text child node of that element is displayed as the title of that topicref in the map. If the root element does not have a class attribute that file will have a title in the DITA Maps Manager view only if the root element is called dita.

Does your specialization keep the

Code: Select all

 topic/topic 

string in the class attribute? Can you send us (using the Technical Support form) some sample files of your specialization including the DTD files in order to look into the problem?


Thank you,
Sorin
bpopp
Posts: 37
Joined: Tue Nov 30, 2010 7:34 pm

Re: Specialization Breaking the Maps Manager Title

Post by bpopp »

Good information, but that's not really what I'm seeing. You must be making an exception for composite wrappers (like dita). For example, if I have a file in a map that looks like this:

Code: Select all

<!DOCTYPE dita PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<dita>
<topic id="DFS" >
<title>Blah</title>
<body/>
</topic>
</dita>
The icon changes and the "Blah" shows correctly in the Maps Manager. There is no "class" attribute for the root element (dita in this case). If I replace the composite with my comparable specialization:

Code: Select all

<!DOCTYPE fxdita PUBLIC "-//FEDEX//DTD DITA Composite//EN" "fxditabase.dtd">
<fxdita>
<fxtopic id="DFS" >
<title>Blah</title>
<fxbody/>
</fxtopic>
</fxdita>
The icon changes back and the title disappears (as shown above). The class attribute for my specialized topic (fxtopic) shows as:

Code: Select all

"- topic/topic fxtopic/fxtopic "
and the class attribute for my topic (not specialized) remains as:

Code: Select all

"- topic/title "
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Specialization Breaking the Maps Manager Title

Post by sorin_ristache »

bpopp wrote:The icon changes back and the title disappears (as shown above). The class attribute for my specialized topic (fxtopic) shows as:

Code: Select all

"- topic/topic fxtopic/fxtopic "
In the current version (12.2) only the files with a dita root element are accepted as DITA composites. I think Oxygen should relax this condition and accept any root element name as long as the class attribute of each child element of the root contains

Code: Select all

 topic/topic 
We will consider that for a future version of Oxygen.


Thank you for the example,
Sorin
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Specialization Breaking the Maps Manager Title

Post by Radu »

Hi Brian,

The DITA 1.2 specification (true also for older DITA versions) for <dita> composites:
http://docs.oasis-open.org/dita/v1.2/os ... .html#dita

states:
Inheritance

Not a specializable DITA element.
So according to the specification you cannot specialize on <dita> to become <fxdita> as it has no class attribute.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bpopp
Posts: 37
Joined: Tue Nov 30, 2010 7:34 pm

Re: Specialization Breaking the Maps Manager Title

Post by bpopp »

I did not know that. I guess the only way to add specializations to the composite would be to change the ditabase.dtd. Seems kinda cludgy. I think I'll just avoid using composites. Thanks for the information.
Post Reply