Cross Reference to ordered list

Post here questions and problems related to editing and publishing DITA content.
IsleofGough
Posts: 34
Joined: Fri Dec 02, 2016 9:55 pm

Cross Reference to ordered list

Post by IsleofGough »

Could you help me with the dita code for correct cross references to on ordered list (endnote)? Since I often have several references to the same endnote, I don’t want to use footnote/endnotes directly but have a bibliography file that has an ordered list. I created such a document “Bibliography.dita” and tried to make a cross reference to it in a separate dita file in the same directory “Document.dita”. I get an error message saying “Referenced Topic ID not found.” Thanks. Here is the code:

Document.dita

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="concept_jlz_3c5_gtb">
    <title>My Document</title>
    <conbody>
        <p>This is a document with a crossreference to an endnote 
            [<<xref href="bibliography.dita#DITA" type="li"/>]
        </p>
    </conbody>
</concept>
Bibliography.dita

Code: Select all

<?xml version="1.0"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="concept_60C4D0117D5941E4A5F815B50A7F8454"> 
  <title>Bibliography</title> 
  <conbody> 
     <ol>
        <li id="Doe">Doe J. My first book.</li>
        <li id="Oxygen"><xref href="https://www.oxygenxml.com/" scope="external" format="html"/></li>
        <li id="DITA"><xref href="https://www.ditawriter.com"/></li>
    </ol>
  </conbody> 
</concept> 
IsleofGough
Posts: 34
Joined: Fri Dec 02, 2016 9:55 pm

Re: Cross Reference to ordered list

Post by IsleofGough »

I see the error. I need to use:

Code: Select all

<xref href="bibliography.dita#concept_60C4D0117D5941E4A5F815B50A7F8454/DITA" type="li"/>
or whatever the concept ID number is.
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Cross Reference to ordered list

Post by chrispitude »

Hi IsleofGough,

I find it easiest to let Oxygen create the link for me. It has a Paste special > Paste as link operation that makes it easy:

create_link.gif
create_link.gif (114.07 KiB) Viewed 690 times
IsleofGough
Posts: 34
Joined: Fri Dec 02, 2016 9:55 pm

Re: Cross Reference to ordered list

Post by IsleofGough »

Thank you!
Post Reply