What the best way to add custom dtd to oXygen

Post here questions and problems related to editing and publishing DITA content.
eloralon
Posts: 38
Joined: Thu Oct 28, 2010 5:10 pm

What the best way to add custom dtd to oXygen

Post by eloralon »

Hello,

I am new to DITA and oXygen, and have a set of DTDs that need to be added to oXygen. That will allow to create new topic or map based on the custom dtds.

I am just starting, so please bear with me and give a step-by-step instructions.

Thank you in advance for your help.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: What the best way to add custom dtd to oXygen

Post by sorin_ristache »

Hello,

I think you are trying to create what is called a DITA specialization. There is a section in the Oxygen user manual about integrating/creating your own DITA specialization in Oxygen. Please look at the Integration of a DITA Specialization topic from that section.

Also you should look at this forum post which deals with the same issue.


Regards,
Sorin
eloralon
Posts: 38
Joined: Thu Oct 28, 2010 5:10 pm

Re: What the best way to add custom dtd to oXygen

Post by eloralon »

Thanks a lot Sorin,

I downloaded the plugin and it does exactly what I wanted.

My trouble is that I have got a few thousands of words in different xml files to convert to title case and was thinking to do the the conversion in a batch mode.

If you know of way to do it in batch mode please let me know. Ideally I thought it would be possible to do it using Find/Replace in Files using some a regular expression pattern.

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

Re: What the best way to add custom dtd to oXygen

Post by sorin_ristache »

Both the Find/Replace dialog box and the Find/Replace in Files one accept regular expression patterns but there is no pattern for replacing a lowercase letter with the corresponding uppercase one. I suggest creating and running an XSLT stylesheet in Oxygen that does this conversion of the text content of your XML files.


I hope this helps,
Sorin
eloralon
Posts: 38
Joined: Thu Oct 28, 2010 5:10 pm

Re: What the best way to add custom dtd to oXygen

Post by eloralon »

Thanks Sorin,

It looks like I was mixing up the requests that I had between the DTD and title case conversion.

In any case, I would really appreciate if you can provide a sample stylesheet for that purpose, or at least if you have a link to a template somewhere.

Thanks for your help.

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

Re: What the best way to add custom dtd to oXygen

Post by sorin_ristache »

Hello,

I think you can start from an XSLT stylesheet that is an identity transform template and add some XSLT templates to that stylesheet that will match the text nodes that you want to change. You may go through an XSLT tutorial if you are not familiar with that or go to some forums with XSLT experts like the XSL-List.


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

Re: What the best way to add custom dtd to oXygen

Post by sorin_ristache »

eloralon wrote:I am new to DITA and oXygen, and have a set of DTDs that need to be added to oXygen. That will allow to create new topic or map based on the custom dtds.

I am just starting, so please bear with me and give a step-by-step instructions.
If the set of DTDs comes as a DITA-OT plugin the first thing that you should try is:

  • Copy the folder with all the plugin files in the folder [Oxygen-folder]/frameworks/dita/DITA-OT/plugins
  • Run the command

    Code: Select all

    ant -f frameworks\dita\DITA-OT\integrator.xml
    in a console that is opened in the folder [Oxygen-folder]. This command will integrate the plugin in the DITA Open toolkit that runs in Oxygen. Also you have to make sure that you have write permissions in the folder [Oxygen-folder].

Regards,
Sorin
eknodt
Posts: 2
Joined: Mon Jan 30, 2012 8:37 pm

Re: What the best way to add custom dtd to oXygen

Post by eknodt »

Hi,

I am trying to integrate the DITA message specialization and am getting this error. Although the build states success, when i open Oxygen Author and look under new, i do not see the specialized message topic.

Am i missing a step somewhere?
Thanks,
eva

C:\Program Files\Oxygen XML Author 13>tools\ant\bin\ant -f frameworks\dita\DITA-OT\integrator.xml
Buildfile: C:\Program Files\Oxygen XML Author 13\frameworks\dita\DITA-OT\integrator.xml

integrate:
[integrate] Failed to read supported image extensions from configuration, using
defaults.

BUILD SUCCESSFUL
Total time: 8 seconds
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: What the best way to add custom dtd to oXygen

Post by Radu »

Hi Eva,

Integrating a specialization in the DITA Open Toolkit means that the DITA OT will be able to publish this sort of DITA topics.
Also after you make the integration and you open specialized topics in Oxygen, Oxygen should also be able to validate and provide support to edit them.

But the integrated specialization will not automatically add new file templates in the Oxygen "New" dialog wizard.

But if you add new file templates for your topics to this folder:

OXYGEN_INSTALL_DIR\frameworks\dita\templates\topic

they should be automatically picked up by Oxygen in the New dialog wizard.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
eknodt
Posts: 2
Joined: Mon Jan 30, 2012 8:37 pm

Re: What the best way to add custom dtd to oXygen

Post by eknodt »

Hi Radu,

thank you for your response.

Are you saying my output suggests that the integrator operation was successful? Yes?

But it is missing templates?

Can you point me to instructions how to do this?

Basically i need to understand what i need to do next so i can open a new topi cf type messageref.

Thanks,
eva
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: What the best way to add custom dtd to oXygen

Post by Radu »

Hi Eva,

The output suggests there was a warning:

Code: Select all

[integrate] Failed to read supported image extensions from configuration, using
defaults.
but the warning does not seem fatal.

Basically a DITA specialization usually provides the DTDs for editing and validating specialized topics.
It does not provide the topics which should be edited.

A file template is a small XML file containing a sample topic's content.
You can look at this file template to see what it contains:

OXYGEN_INSTALL_DIR/frameworks/dita/templates/topic/Topic.dita

If you add new file templates in the same folder, Oxygen should show them to you when you use the New wizard dialog.

If you have trouble with creating a new file template for your specialization topics and if you can share the DITA specialization, you can send your specialization files to our support email address (support@oxygenxml.com) and I'll try to take a look at them.

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