Remove Specialization

Post here questions and problems related to editing and publishing DITA content.
DitaConversion
Posts: 4
Joined: Thu Aug 25, 2016 5:31 pm

Remove Specialization

Post by DitaConversion »

Hello,

I have been using Oxygen Developer for the past week or so, am brand new to using Dita.

I have read the tutorial below:

http://www.xiruss.org/tutorials/dita-specialization/

However I request some guidance as it is a bit unclear what path I must take.

To give a brief summary, I have Dita files that use custom specialization. I need to remove these specializations, i.e undo it so I have the original Dita files without any custom tags.

I have DTDs which contain these specialization, but unfortunately the tutorials I read only demonstrate how to add these specializations. I'm not sure how to go about the opposite process.

Does Oxygen support what I am trying to achieve? If so can anyone point me in the right direction?

Thank you in advance for your help!
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: Remove Specialization

Post by Radu »

Hi,

In the DITA Open Toolkit there is an XSLT stylesheet:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/xsl/generalize.xsl

If you create an XSLT transformation scenario in Oxygen and apply this XSLT stylesheet over the DITA topic, it will generalize its element tags. It might not do precisely what you want but maybe you can change it to better fit your use case.
You should probably also register on the DITA Users List:

http://dita.xml.org/dita-users

and ask a question there, maybe they have better suggestions for you.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
DitaConversion
Posts: 4
Joined: Thu Aug 25, 2016 5:31 pm

Re: Remove Specialization

Post by DitaConversion »

Hello Radu,

Thank you for your response. I did as you said and tried the XSLT transformation scenario using the DITA OT. It seems to work fine for topic (.dita) files, however my main issue is generating the .DTD files.

From my limited understanding of DITA (apologies as I am quite new to this), the .DTD files contain the specialization that can make .dita files unique. I need to strip that specialization so I have the original .dita files that have no custom tags, just the base case.

Is there any way to revert back to original .DITA with no customization for all the files (.dita, .dtd etc)

I will join the yahoo group you suggested, thank you again for your help it is much appreciated.
DitaConversion
Posts: 4
Joined: Thu Aug 25, 2016 5:31 pm

Re: Remove Specialization

Post by DitaConversion »

UPDATE

To clarify, I do not need to touch the .DTD files.

I just need to be able to remove any custom specialization in the .dita files.

Is there some sort of way to validate a .dita file, i.e determine what has been specialized? I've looked for some sort of dita validator but I am unable to find one.
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: Remove Specialization

Post by Radu »

Hi,

Specialized DITA topics and maps should have a DOCTYPE declaration at the beginning of the file like:

Code: Select all

<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
In your case the DOCTYPE declaration probably points to the specialized DTDs. But maybe you can use our Find/Replace in Files tool with a regular expression to replace all those existing DOCTYPE declarations with DOCTYPE declarations which point to the base DITA DTDs. In this way Oxygen should show validation errors for elements which are not part of the base DTDs.

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