Link on an image
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Link on an image
Post by sorin_ristache »
Hello,
Do you want the action of clicking on an image in DITA XHTML output to open a new topic in the browser? You should try the DITA <image> element inside an element that creates a link to other topic, for example <xref>:
Regards,
Sorin
Do you want the action of clicking on an image in DITA XHTML output to open a new topic in the browser? You should try the DITA <image> element inside an element that creates a link to other topic, for example <xref>:
Code: Select all
<xref keyref="flowers.perennial" format="dita">perennial <image href="../images/Chrysanthemums.jpg"/></xref>
Regards,
Sorin
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Link on an image
Post by sorin_ristache »
Hello,
First make sure that clicking on the link works (jumps to the task2 topic in the PDF viewer application) when you have only a text in the link:
This should work, it is just a normal link to other part of the PDF output. After this works correctly you can also add the image in the <xref> element. Please make sure that the file path to the image file is correct, in your example schema_row2.png.
Regards,
Sorin
First make sure that clicking on the link works (jumps to the task2 topic in the PDF viewer application) when you have only a text in the link:
Code: Select all
<xref keyref="task2.dita#task2.dita">XX</xref>
Regards,
Sorin
-
- Posts: 147
- Joined: Sat Oct 19, 2013 8:21 am
Re: Link on an image
If I simply shows the relationship <xref href="task2.dita#task2.dita"/> it is OK
If i indicate <image href="schema_row2.png"></image> the image is displayed
If i indicate <xref keyref="task2.dita#task2.dita"><image href="schema_row2.png"></image></xref> I do not have the link or the picture?
Thank you
If i indicate <image href="schema_row2.png"></image> the image is displayed
If i indicate <xref keyref="task2.dita#task2.dita"><image href="schema_row2.png"></image></xref> I do not have the link or the picture?
Thank you
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Link on an image
Post by sorin_ristache »
Maybe the path to the image was correct in the topic where you inserted only the <image> element, but is not correct in the topic where you inserted the element <xref keyref="task2.dita#task2.dita"><image href="schema_row2.png"></image></xref> ? If the <xref> element creates a link in the PDF output when it contains only text (no image) and the image is displayed correctly when inserted in the same DITA topic using the same path as in the <xref> element (<image href="schema_row2.png">) then the image should be displayed and act as a clickable link when you insert the element:
This is what I get in a sample DITA where I tried this.
Does the output view called DITA OT [PDF] contain errors when you run the DITA PDF transformation? By default this view is not displayed, so you will have to enable it with the setting called Show console output - Always available on the Output tab of the DITA transformation dialog box.
Regards,
Sorin
Code: Select all
<xref keyref="task2.dita#task2.dita"><image href="schema_row2.png"></image></xref>
Does the output view called DITA OT [PDF] contain errors when you run the DITA PDF transformation? By default this view is not displayed, so you will have to enable it with the setting called Show console output - Always available on the Output tab of the DITA transformation dialog box.
Regards,
Sorin
-
- Posts: 147
- Joined: Sat Oct 19, 2013 8:21 am
Re: Link on an image
Indeed there is a mistake, but I do not understand
thank you
xxxxxxxxxxxxxx\IMAGES_CLIQUABLE\Image_map_examples\schema_table.ditamap
Nom du moteur: DITA-OT
Gravité: info
Description: [DOTJ047I] Unable to find key definition for keyref="task2.dita#task2.dita", href may be used as fallback if it exists.
URL: http://dita-ot.sourceforge.net/readme/D ... __DOTJ047I
thank you
xxxxxxxxxxxxxx\IMAGES_CLIQUABLE\Image_map_examples\schema_table.ditamap
Nom du moteur: DITA-OT
Gravité: info
Description: [DOTJ047I] Unable to find key definition for keyref="task2.dita#task2.dita", href may be used as fallback if it exists.
URL: http://dita-ot.sourceforge.net/readme/D ... __DOTJ047I
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Link on an image
Post by sorin_ristache »
Please look at the description of the error code pointed to by the error message in the Oxygen errors view. It seems your DITA key is not defined correctly or the target of the key cannot be found in the content of your current map. You can find details about working with DITA keys for example here.
Regards,
Sorin
Regards,
Sorin
-
- Posts: 147
- Joined: Sat Oct 19, 2013 8:21 am
Re: Link on an image
That the link works without error must be indicated :
Code: Select all
<xref href="task2.dita#task2.dita"> <image href="schema_row2.png"/></xref>
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Link on an image
Post by sorin_ristache »
If you are not using a DITA key then that is correct, you have to use the href attribute for creating the link to other topic, not the keyref one. So it does not matter if an image is inserted or not in the clickable area of the link, the important thing is to use in the xref element the correct attribute and file path to the target topic.
Regards,
Sorin
Regards,
Sorin
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service