Is it possible to create specialization on top of the existing domain?

31 views
Skip to first unread message

Vlad Ivanov

unread,
May 18, 2017, 4:59:17 PM5/18/17
to DITA-OT Users
Hello,

I need to create a specialization for DITA. Simply put, there are some domain-specific tags I'd like to use in my document. For example, this:

<tag>
text
</tag>


is supposed to be processed through XSL stylesheet and be turned into one of existing elements supported by pdf2 processor:

<b>
  <i>
    test
  </i>
<b>

I have written the necessary XSLT transformations and tested them standalone. Now, as far as I understand, I need to provide the necessary document type definitions to DITA. This tutorial: https://dita4practitioners.github.io/dita-specialization-tutorials/ implies the user should copy one of DTD files and edit it.

Is there a way around it? It would be good to just reference the existing document type (topic in my case) and extend it with new element definitions. Are there any specialization plugin examples where this is implemented?

Regards,

Vlad

Stefan Eike

unread,
May 19, 2017, 3:04:02 AM5/19/17
to DITA-OT Users
Hi Vlad,

you can create specialization chains, just look at the example topics, use the DITA generator and continue reading Eliots tutorials. I would not recommend to specialize domains, but this should also work. Just create a new domain and make sure, you correctly specialize the base elements.

<!ATTLIST  imagemap     %global-atts;  class CDATA "+ topic/fig ut-d/imagemap ">
<!ATTLIST  glossentry   %global-atts;  class CDATA "- topic/topic concept/concept glossentry/glossentry ">

Greetings,
Stefan

Vlad Ivanov

unread,
May 19, 2017, 4:26:08 AM5/19/17
to DITA-OT Users
Hello Stefan,

thank your for answering. DITA Generator is indeed very useful. So, after I use "structural specialization" feature of the generator, how do I reference the document type? I have generated the plugin, put in into DITA plugins folder and run integrator. I have a PDF plugin derived from pdf2 (I used the tutorial from the "DITA for Print" book). Now, assuming I have based my structural specialization on type "topic", do I have to replace the following in my topic file (which is included with topicref from the map)

<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">

with the doctype generated in catalog-dita.xml?

<public publicId="-//COMPANY//DTD DITA Topic//EN" uri="dtd/topic.dtd" />

I also have added a plugin requirement to my PDF plugin. Are there any additional steps to it?

Sorry if the answer is obvious — I'm quite new to XML authoring.

Regards,

Vlad

Stefan Eike

unread,
May 19, 2017, 4:49:48 AM5/19/17
to DITA-OT Users
Hi Vlad,

1. Create your new domains.
2. Create your new topic/map types, add or remove domains.
3. Setup the XML catalog.

That's the process (very roughly explained). I cannot/don't want to explain that step-by-step. Please take the time and complete Eiots tutorials. You need to complete the full process to fully understand it. Please ask again, if you have questions. Please open one new thread per question.

Yes, you have to change the DOCTYPE to use the new topic. And I don't know whether you have to complete additional steps for your PDF plugin: It depends. The generator spits out a ZIP file, which is a DITA-OT plugin, that can be installed with dita --install. Just install and try it.

Greetings,
Stefan

Vlad Ivanov

unread,
May 19, 2017, 4:55:56 AM5/19/17
to DITA-OT Users
Hi Stefan,

thank you again, this overall process description is what I needed.

Regards,

Vlad
Reply all
Reply to author
Forward
0 new messages