<xref> link unresolved in PDF published from dita map

75 views
Skip to first unread message

Corinna Kinchin

unread,
Apr 24, 2019, 5:50:50 AM4/24/19
to DITA-OT Users
Good morning all,

I've found that <xref> links are unresolved in the PDF produced by PDF2 (and also by our com.miramo.mmpdf plugin which uses the PDF2 topicmerge) when publishing a topic as part of a DITA map, but not when publishing the topic standalone.

I'm not sure whether it's a bug in the DITA-OT topicmerge or if the @href uses invalid syntax (the DITA was supplied by one of our partner's customers, and I've read the documentation many times but can't quite get it, sorry ;)

To illustrate, 'topic.dita' contains the following:

<p>Renata Báez-Saldaña, MC, Dra. en C (<xref scope="local"
               
href="topic.dita#ref1"
               
>1</xref>,<xref scope="local"
               
href="topic.dita#ref2"
               
>2</xref>)</p>
       
<p/>
       
<p id="ref1">(1)
            Instituto Nacional de Enfermedades Respiratorias.
</p>
       
<p id="ref2">(2)
            División de Posgrado, Facultad de Medicina, Universidad Nacional Autónoma de México.
            Ciudad de México.
</p>


Publishing this to PDF as a standalone works correctly, the links are active.

But publishing it as referenced by this map:
<map title="790Texto del artículo52220190405" ditaarch:DITAArchVersion="1.2"
   
xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/">
   
<title>790Texto del artículo52220190405</title>
   
<topicref type="topic"
       
href="topic.dita"/>
</map>

... results in unresolved cross reference warnings:

     [fop] [WARN] Page 3: Unresolved ID reference "unique_2" found.
     
[fop] [WARN] Page 3: Unresolved ID reference "unique_3" found.

and the resulting links are not active.

Reworking the @href values to #topic-id/ref1, #topic-id/ref2 works correctly in the links are active in the PDF produced from the map as well as the topic.

Any feedback would be most welcome ...

Radu Coravu

unread,
Apr 24, 2019, 8:03:36 AM4/24/19
to Corinna Kinchin, DITA-OT Users
Hi Corinna,

Any reference to a DITA element inside a topic must also specify the topic ID value:


"A DITA local identifier consists of topicID/elementID for a subelement of a topic"

so in the case of your links you can use either:

topic.dita#topicid/elementid
or:
 #topicid/elementid
or:
#./elementid

The fact that on your sample content the publishing works when generating the PDF from only the topic content is a bug in the publishing engine, it's too lax in this case.

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.
For more options, visit https://groups.google.com/d/optout.

Corinna Kinchin

unread,
Apr 24, 2019, 9:06:26 AM4/24/19
to DITA-OT Users
Thanks a million Radu, that's a great help.

I'll clarify this with our partners and their customer.

Best regards,
... Corinna
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