When it comes to reusing images using keys there are two possible
1) Create a DITA map named something like "imageKeys.ditamap"
with lots of keydefs like:
<keydef keys="image2" href="image2.png" format="png"/>
Refer to this "imageKeys.ditamap" in the main product.ditamap.
From each topic use:
to refer to images.
2) Create an "images.dita" topic which lost of image references,
each image reference with an @id.
The content of the "images.dita" would look like:
<image href="image1.png" alt="image 1 text"
<image href="image2.png" alt="image 2 text"
The "images.dita" would be referenced in the main product.ditamap
as a resource only topic so that it does not appear in the output
and assigned a key:
and then each topic would use conkeyefs to refer to images like:
Approach (2) does have certain upsides, you can reuse also the
image alternate texts. You can also reuse also entire <fig>
Oxygen XML Editor
On 5/29/20 11:14 PM, Matt Lorenzi via
So looks like there's a few avenues here. So rather a a master
topic for the image, I'd create one for each image? That would
resolve the single sourcing issue, but less so if I want to
reuse the text and image in another map - would always have to
make sure I grabbed both topics.
So I could use a keyref for the image placeholder, then call up
the image in my map? Is that what you mean Radu? Is there more
scripting involved than you you provided above? I'm oddly
excited to try this.