Select an image depending on the publication
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 147
- Joined: Sat Oct 19, 2013 8:21 am
Select an image depending on the publication
Hi,
I want to Select an image depending on the publication.
For example :
For the web, I am displaying an image and PDF publishing another image.
How can I do?
Thank you for help
I want to Select an image depending on the publication.
For example :
For the web, I am displaying an image and PDF publishing another image.
How can I do?
Thank you for help
-
- Posts: 9473
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Select an image depending on the publication
Hi,
Probably either:
Probably you could insert for each image two <image> references something like:
and apply the DITA OT processing with DITAVAL custom filtering which based on the profiling attribute value will remove one image reference or the other from the output depending on the publishing format.
Or to avoid duplicate image references in the DITA topic you could refer to the image with a keyref like:
and in the DITA Map have references like this:
and again publish by filtering based on profiling conditions.
Regards,
Radu
Probably either:
Probably you could insert for each image two <image> references something like:
Code: Select all
<image href="../../images/LilacPDF.jpg" audience="pdf"/>
<image href="../../images/LilacWEB.jpg" audience="html"/>
Or to avoid duplicate image references in the DITA topic you could refer to the image with a keyref like:
Code: Select all
<image keyref="Lilac"/>
Code: Select all
<topicref href="images/LilacPDF.jpg" format="jpg" keys="Lilac" audience="pdf"/>
<topicref href="images/LilacWEB.jpg" format="jpg" keys="Lilac" audience="html"/>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 147
- Joined: Sat Oct 19, 2013 8:21 am
Re: Select an image depending on the publication
thank you for response,
For the first solution, you must change the file ditaval each publication?
In second solution i don't understand solution ? if image in topic i indcate the reference <image keyref="Lilac"/>
I can define link in ditamap ?
<topicref href="images/LilacPDF.jpg" format="jpg" keys="Lilac" audience="pdf"/>
if user selected xhtml DITA OT selects the correct link?
thank you
For the first solution, you must change the file ditaval each publication?
In second solution i don't understand solution ? if image in topic i indcate the reference <image keyref="Lilac"/>
I can define link in ditamap ?
<topicref href="images/LilacPDF.jpg" format="jpg" keys="Lilac" audience="pdf"/>
if user selected xhtml DITA OT selects the correct link?
thank you
-
- Posts: 9473
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Select an image depending on the publication
Hi,
Regards,
Radu
The transformation scenario for PDF would use a DITAVAL. The transformation scenario for XHTML would use another one.For the first solution, you must change the file ditaval each publication?
The same in the first case, the transformation scenario for PDF would use a DITAVAL and the transformation scenario for XHTML would use another one. But in this case the DITA topic would not contain two image references, the DITA Map would contain two topic references to the images.In second solution i don't understand solution ? if image in topic i indcate the referenceI can define link in ditamap ?Code: Select all
<image keyref="Lilac"/>
if user selected xhtml DITA OT selects the correct link?Code: Select all
<topicref href="images/LilacPDF.jpg" format="jpg" keys="Lilac" audience="pdf"/>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9473
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Select an image depending on the publication
Hi,
Regards,
Radu
When you edit a transformation scenario, in the Filters tab you can specify the path to a DITAVAL filter file.that contains the ditaval?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 147
- Joined: Sat Oct 19, 2013 8:21 am
Re: Select an image depending on the publication
Hi,
I created the file ditaval the ditamap with reference images, the DITA file calling an image by reference. I specified the location of ditaval in parameters.
Treatment works, but I get errors in the console
E[DITA-OT][DOTX021E]
Missing navtitle attribute or element for non-DITA resource "images/PDF.jpg". References must provide a local navigation title when the target is not a local DITA resource.................
Definition in ditamap :
E[DITA-OT][DOTX025E]
Missing linktext and navtitle for non-DITA resource "images/PDF.jpg". References must provide a local navigation title when the target is not a local DITA resource.
An other question : Each treatment must be changed ditaval depending on the desired publication?
Thank you
Best regards
I created the file ditaval the ditamap with reference images, the DITA file calling an image by reference. I specified the location of ditaval in parameters.
Treatment works, but I get errors in the console
E[DITA-OT][DOTX021E]
Missing navtitle attribute or element for non-DITA resource "images/PDF.jpg". References must provide a local navigation title when the target is not a local DITA resource.................
Definition in ditamap :
Code: Select all
<topicref href="images/PDF.jpg" format="jpg" audience="pdf" keys="XXXX"/>
Missing linktext and navtitle for non-DITA resource "images/PDF.jpg". References must provide a local navigation title when the target is not a local DITA resource.
An other question : Each treatment must be changed ditaval depending on the desired publication?
Thank you
Best regards
-
- Posts: 9473
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Select an image depending on the publication
Hi,
Ideally you would not need one image for PDF and another for the XHTML output, if your images appeared stretched-out in the PDF maybe you should read this:
http://www.oxygenxml.com/doc/ug-oxygen/ ... utput.html
Regards,
Radu
This warning is probably benign, it should have probably not been issued at all by the DITA Open Toolkit. To inhibit it you can add a navtitle attribute on the topicref:Missing linktext and navtitle for non-DITA resource "images/PDF.jpg". References must provide a local navigation title when the target is not a local DITA resource.
Code: Select all
<topicref href="images/PDF.jpg" format="jpg" audience="pdf" keys="XXXX" navtitle="Image"/>
Each transformation scenario must specify a DITAVAL which filters the references in the map accordingly based on the @audience attribute.Each treatment must be changed ditaval depending on the desired publication?
Ideally you would not need one image for PDF and another for the XHTML output, if your images appeared stretched-out in the PDF maybe you should read this:
http://www.oxygenxml.com/doc/ug-oxygen/ ... utput.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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