Bypassing missing images without being visible in output
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 3
- Joined: Wed Nov 02, 2016 4:54 pm
Bypassing missing images without being visible in output
Post by John McGowan »
Hi,
I am looking for a way to bypass images that are not in a referenced image directory.
I need to do this to streamline images when docs are translated externally or when the image is not applicable to a certain region or customer.
The issues is that I need to do this so that there is no visible hint in the DHTML output that the image is missing - as if in error.
Anyone know of a good way to do this, either in DITA itself or with JS?
Thanks.
I am looking for a way to bypass images that are not in a referenced image directory.
I need to do this to streamline images when docs are translated externally or when the image is not applicable to a certain region or customer.
The issues is that I need to do this so that there is no visible hint in the DHTML output that the image is missing - as if in error.
Anyone know of a good way to do this, either in DITA itself or with JS?
Thanks.
-
- Posts: 159
- Joined: Mon Nov 24, 2014 1:49 pm
- Location: Greven/Germany
Re: Bypassing missing images without being visible in output
Hi John,
maybe you could use a Schematron rule to check the href value and force the user by error message/quickfix to set the required filter attributes on that element. Would that help?
Greetings,
Stefan
maybe you could use a Schematron rule to check the href value and force the user by error message/quickfix to set the required filter attributes on that element. Would that help?
Greetings,
Stefan
stefan-jung.org – Your DITA/DITA-OT XML consultant
-
- Posts: 3
- Joined: Wed Nov 02, 2016 4:54 pm
Re: Bypassing missing images without being visible in output
Post by John McGowan »
Hi Stefan,
Maybe I wasn't clear.
I want to make it possible to bypass the link error, so that it is not visible in the output.
For example, if I have a doc with several flavors, and I only want to include the image in two flavors, but I want to have the link in all flavors, then I need to be able to do that without getting the ubiquitous red cross in the output when it couldn't locate the image.
Also, I do not want to do it with conditionals for all flavors and languages.
Tricky one, I know
Maybe I wasn't clear.
I want to make it possible to bypass the link error, so that it is not visible in the output.
For example, if I have a doc with several flavors, and I only want to include the image in two flavors, but I want to have the link in all flavors, then I need to be able to do that without getting the ubiquitous red cross in the output when it couldn't locate the image.
Also, I do not want to do it with conditionals for all flavors and languages.
Tricky one, I know

-
- Site Admin
- Posts: 275
- Joined: Thu Dec 24, 2009 11:21 am
Re: Bypassing missing images without being visible in output
Hello,
You can try to use the following JS code:
The procedure of inserting custom content into the output HTML files can be found at:
You can try to use the following JS code:
Code: Select all
$(".image").error(function(){
$(this).hide();
});
The procedure of inserting custom content into the output HTML files can be found at:
- For WebHelp Responsive: https://www.oxygenxml.com/doc/versions/ ... -html.html
- For WebHelp Classic: https://www.oxygenxml.com/doc/versions/ ... hing2.html
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 3
- Joined: Wed Nov 02, 2016 4:54 pm
Re: Bypassing missing images without being visible in output
Post by John McGowan »
Thanks Alin.
Can this be added directly into the processing instructions?
Can this be added directly into the processing instructions?
-
- Site Admin
- Posts: 275
- Joined: Thu Dec 24, 2009 11:21 am
Re: Bypassing missing images without being visible in output
What do you mean by that? Can you give me an example?John McGowan wrote:Thanks Alin.
Can this be added directly into the processing instructions?
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “General XML Questions”
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