Page 1 of 1

Cross Reference to ordered list

Posted: Thu Apr 21, 2022 3:35 am
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> 

Re: Cross Reference to ordered list

Posted: Thu Apr 21, 2022 4:07 am
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.

Re: Cross Reference to ordered list

Posted: Fri Apr 22, 2022 2:01 pm
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

Re: Cross Reference to ordered list

Posted: Fri Apr 22, 2022 6:24 pm
by IsleofGough
Thank you!