Search code examples
dita

Customize DITA: allow p in dt


I am using the DITA standard. As a matter of fact, I have to allow p tag in dt. I want to ban CDTA in the element dt and allow the element p for it.

I changed in file commonElements.mod the following code

<!ENTITY % term.cnt 
  "#PCDATA | 
   %basic.ph; | 
   %data.elements.incl; | 
   %foreign.unknown.incl; | 
   %image;
  "
>

To

<!ENTITY % term.cnt 
  "p | 
   %basic.ph; | 
   %data.elements.incl; | 
   %foreign.unknown.incl; | 
   %image;
  "
>

The result is still CDTA in dt allowed and no p tag On witch dita file I have to make my changes? Thanks


Solution

  • Do not change any official DITA files!

    You should create a specialization.

    You must not allow the <p> element in <dt>. This violates the specification. Maybe you'd like create a new element that is based on an element that is allowed in <dt>. Then you can change the appearance of your new element to look like a <p> element.

    Maybe you should explain what you're trying to achieve.