Using -dita-use-conref-target to @id attribute in conkeyref.

13 views
Skip to first unread message

Toshihiko Makita

unread,
Jun 25, 2019, 1:05:14 PM6/25/19
to DITA-OT Users
Hi All,

One of my clients uses lot of same <fn> elements in authoring. So they decided to use keys instead of writing many same <fn> contents for PDF output.

[Commonly used file: cFnCommon.dita]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="cFnCommon">
    <title>FN Common</title>
    <conbody>
        <p><fn id="fn_common" callout="★">: If equipped</fn></p>
    </conbody>
</concept>

[Authoring Topic: cFnConkeyrefTest.dita]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="cFnConkeyrefTest">
    <title>Fn Conkeyref Test</title>
    <conbody>
        <p>Quick fox jumps over the lazy dog.<fn conkeyref="COMMON-FN/fn_common" id="-dita-use-conref-target"/><xref href="#./fn_common" format="fn"/></p>
    </conbody>
</concept>

[Map: mConkeyrefTest.ditamap]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
    <title>Conkeyref test</title>
    <topicref href="cFnCommon.dita" keys="COMMON-FN" format="dita"/>
    <topicref href="cFnConkeyrefTest.dita" format="dita"/>
</map>

However the result is not as expected. Here is excerpt from merged middle file:

<conbody class="- topic/body  concept/conbody " xtrc="conbody:1;13:14" xtrf="file:/C:/Users/toshi/OneDrive/Documents/test/dita/20190626-id/cFnConkeyrefTest.dita">
    <p class="- topic/p " xtrc="p:1;14:12" xtrf="file:/C:/Users/toshi/OneDrive/Documents/test/dita/20190626-id/cFnConkeyrefTest.dita">Quick fox jumps over the lazy dog.<fn callout="★" class="- topic/fn " xtrc="fn:1;14:43" xtrf="file:/C:/Users/toshi/OneDrive/Documents/test/dita/20190626-id/cFnCommon.dita">: If equipped</fn><xref class="- topic/xref " format="fn" href="cFnConkeyrefTest.dita#./fn_common" xtrc="xref:1;14:152" xtrf="file:/C:/Users/toshi/OneDrive/Documents/test/dita/20190626-id/cFnConkeyrefTest.dita"/></p>
</conbody>

As you can see id="-dita-use-conref-target" seems not to work. As a result, xref to fn does not resolved correctly. Am I dong something wrong? Or missing something important?

Any suggestions are welcome.

Regards,

Toshihiko Makita

Radu Coravu

unread,
Jun 26, 2019, 1:55:08 AM6/26/19
to Toshihiko Makita, DITA-OT Users
Hi Toshihiko,

Looking at the specs:

it seems to state that it's not allowed to use this particular value in topic @id attributes.
But you are using it in a sub-topic element, so this looks like a bug to me. The bug seems to occur for any DITA element with conref/conkeyref.

Regards,
Radu

--
You received this message because you are subscribed to the Google Groups "DITA-OT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dita-ot-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/dita-ot-users/1d20a73f-5d20-4475-951e-ea49e50e5873%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Toshihiko Makita

unread,
Jun 26, 2019, 2:50:03 AM6/26/19
to DITA-OT Users
Hi Radu,

I also read the specification you mentioned. As you said, fn/@id is not defined as ID. It is defined as NMTOKEN.
If it is a bug I will submit the issue to the DITA-OT GitHub repository.
But I"m not still certain.

Regards,

2019年6月26日水曜日 14時55分08秒 UTC+9 Radu Coravu:
Hi Toshihiko,

Looking at the specs:

it seems to state that it's not allowed to use this particular value in topic @id attributes.
But you are using it in a sub-topic element, so this looks like a bug to me. The bug seems to occur for any DITA element with conref/conkeyref.

Regards,
Radu

To unsubscribe from this group and stop receiving emails from it, send an email to dita-o...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages