Just Write Click

Technical writing with Continuous Integration and docs-as-code

  • JustWriteClick
  • Contact
  • Books by Anne Gentle
  • Introducing Docs Like Code
You are here: Home / talk.bmc / Using the DITA catalog for your specializations, creating a Public ID

August 16, 2006 by annegentle

Using the DITA catalog for your specializations, creating a Public ID

Thought our discovery might help you as you specialize DITA

At BMC we are dusting off some DITA specializations that we did about two years ago. We were using the non-OASIS release of DITA at the time, and our XML guru discovered that where the DITA dtd, mod, and entity files once said “IBM,” they now say “OASIS.” So all of our specializations had to be changed so that the entity declarations had //OASIS// instead of //IBM//.

But even with those changes, I still couldn’t get ant to build my DITA map files. No matter what relative path I put in my topic file, pointing to the DTD, nor where I would put the topic XML files relative to the DTD directory, ant refused to find the DTDs, giving me errors like “Cannot find \dtd\tBasicConcept.dtd” or “Cannot find C:\DITA-OT1.2.2\projects\dtd\tBasicConcept.dtd.” Originally, I thought that the problem was that ant looks relative from the ant basedir directory (it’s set to C:\DITA-OT1.2.2 on my machine) instead of relative from the topic file itself. However, I learned that public identifiers are your friends and you can avoid these relative path problems via the DITA catalog file in the DITA Open Toolkit.

Using Public IDs

I didn’t actually discover this helpful method of tracking DTD references. Our XML guru and information architect discovered that we needed to have entries in the catalog-dita.xml file in order for ant to find the specializations. That addition allows us to use public IDs instead of absolute or relative paths to the DTDs in our topic XML files. Whew!

So, in my topic files, I can refer to our specialized Concept topic, “tBasicConcept.dtd” (no relative or absolute file path) and as long as the catalog-dita.xml file has these entries for the publicIds, the DITA Open Toolkit finds the DTD and builds happily.

Here are examples of the catalog entries:

<public publicId="-//BMC//DTD DITA topic BMC Basic

Concept//EN" uri="bmcproc/tBasicConcept.dtd"></public>

<public publicId="-//BMC//ELEMENTS DITA topic BMC Basic
Concept//EN" uri="bmcproc/tBasicConcept.mod"></public>

Here are examples of the referrer in the XML topic file:

<!DOCTYPE basicConcept PUBLIC "-//BMC//DTD DITA topic BMC Basic

Concept//EN"  "tBasicConcept.dtd">

Woops, the catalog can be overwritten

After a little searching on the dita-users Yahoo Group, I did find the following caveat for altering your catalog-dita.xml file directly. From Deborah Pickett in this message “Note: catalog-dita.xml is a generated file. It is overwritten when you run the “integrator” task. If you find your changes are being removed, put them in catalog-dita_template.xml instead.” I think you only run the integrator task when you are installing plug-ins, and so far we haven’t installed plug-ins in our Open Toolkit environment. So our modified catalog file is safe for now.

Separating your authoring environment from your processing environment

Now, if you were really paying attention to the catalog entries, you’d notice we’re using a “bmcproc” directory for our specializations. In our environment, we have two sets of specializations by design. One is a processing specialization, and that is the one I’m using for the ant builds. The other set of specializations is a “bmcauth” directory, and we have slightly stricter authoring standards in that set of specializations. But, we want the processing to work with the out-of-the-box transforms supplied by the Open Toolkit, so we designed more DITA-specific processing specializations.

An example of the difference between our authoring environment and the processing environment is that our BMC definition of a section is more restrictive to disallow a mixed PCDATA content model (which non-specialized DITA allows). This stricter definition prevents you from writing a section without tagged markup in our authoring environment. Where DITA allows: “#PCDATA | %basic.ph; | %basic.block; | %title; | %txt.incl;” BMC allows just: “%title;, (%basic.block; | %txt.incl;)+” and hopefully our content will be more semantically tagged because of it.

Related

Filed Under: talk.bmc Tagged With: DITA, DITA catalog, DITA Open Toolkit, DITA specialization, specializations

More reading

Bubble graph showing sources of developer support data

I’ve been thinking a lot about developer support at Cisco recently, especially for the way the world works today with multiple cloud providers. This post is a re-publish of my talk from over five years ago, but the techniques and tools for listening and helping others are still true today. At Rackspace, we watched several […]

Cisco DevNet is our developer program for outreach, education, and tools for developers at Cisco. From the beginning, the team has had a vision for how to run a developer program. Customers are first, and the team implements what Cisco customers need for automation, configuration, and deployment of our various offerings. Plus, the DevNet team […]

I had a great talk with Ellis Pratt of Cherryleaf Technical Writing consulting last week. Here are the show notes, full of links to all the topics we covered. Podcasts are great fun to listen to and participate in, if a bit nerve-wracking to think on your feet and make sure you answer questions succinctly […]

At the beginning of this year, I worked hard to summarize my thoughts on API documentation, continuous publishing, and technical accuracy for developer documentation. The result is an article on InfoQ.com, edited by Deepak Nadig, who also was forward-thinking in having me speak to a few teams at Intuit about API documentation coupled with code. Always […]

Recently on Just Write Click

  • A Flight of Static Site Generators: Sampling the Best for Documentation
  • Try a GPT about “Docs Like Code” to ask questions
  • Discipline and Diplomacy: Docs in the Open
  • Let’s Find Out: When Do Static Site Generators Do Rendering?
  • GitHub for Managing Tech Docs

Just Write Click in your Inbox

Enter your email address to subscribe to Just Write Click and receive notifications of new posts by email.

Read More

  • Privacy Policy
  • About Anne Gentle, developer experience expert
  • Books by Anne Gentle
    • Conversation and Community
    • Docs Like Code, a Book for Developers and Tech Writers
  • Woman in Tech Speaker Profile
  • Contact

Books

  • JustWriteClick
  • Contact
  • Books by Anne Gentle
  • Introducing Docs Like Code

Copyright © 2025 · WordPress · Log in