dlentry elements with conref

Post here questions and problems related to editing and publishing DITA content.
xephon
Posts: 140
Joined: Mon Nov 24, 2014 1:49 pm
Location: Greven/Germany

dlentry elements with conref

Post by xephon »

Hi,

I have a modular application with many data fields. Some data fields are used multiple times in the GUI of the application. My goal is to create databases with reusable explanations of the data fields and to reuse them by conkeyref. Unfortunately the validator forces me to create dd and dt elements.

This is an entry in a database:

Code: Select all

<dl>
<dlentry id="myEntry">
<dt><uicontrol>My Field</uicontrol></dt>
<dd>My Description</dd>
</dlentry>
</dl>
Now I try to embed it by conkeyref. This gives me a validation error, the processing fails:

Code: Select all

<dl>
<dlentry conkeyref="MyDataSource/myEntry"/>
</dl>
The content of element type "dlentry" is incomplete, it must match "(dt+,dd+)".
This works, but looks ugly because I have an empty dt and an emty dd element:

Code: Select all

<dl>
<dlentry conkeyref="MyDataSource/myEntry">
<dt></dt>
<dd></dd>
</dlentry>
</dl>
I'd like to continue using dlentry elements. Do you think that would be possible? Otherwise I have to use something more generic like li elements.


Thanks a lot and best regards,
Stefan
stefan-jung.org – Your DITA/DITA-OT XML consultant
Radu
Posts: 9053
Joined: Fri Jul 09, 2004 5:18 pm

Re: dlentry elements with conref

Post by Radu »

Hi Stefan,
This works, but looks ugly because I have an empty dt and an emty dd element
That is the proper way to do things. The element which makes a conref/conkeyref must be valid by itself according to the DITA DTDs even before the conref is resolved.
If you insert a conref/conkeyref using Oxygen's specialized toolbar actions, it does the same thing, it also inserts required content in the element which makes the conref/conkeyref.

When working in the Author visual editing mode those extra empty elements in the element which makes a conref will not be shown anyway.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
xephon
Posts: 140
Joined: Mon Nov 24, 2014 1:49 pm
Location: Greven/Germany

Re: dlentry elements with conref

Post by xephon »

Ok, layout follows function.

Thanks, Radu!
stefan-jung.org – Your DITA/DITA-OT XML consultant
Post Reply