Unexpected element

Post here questions and problems related to editing and publishing DITA content.
afumo
Posts: 4
Joined: Tue Oct 11, 2022 3:39 pm

Unexpected element

Post by afumo »

I get this https://github.com/AFumo/FileUpload/blo ... pected.PNG error when I use Image Map Editor to draw a box around an image. How do I get around it?
Radu
Posts: 9437
Joined: Fri Jul 09, 2004 5:18 pm

Re: Unexpected element

Post by Radu »

Hi,

The DITA 1.3 specification allows adding an <image> inside a <cmd> but not an <imagemap>:
https://www.oxygenxml.com/dita/1.3/spec ... cmltc__cmd
So this is why Oxygen's validation reports that problem, you cannot have an imagemap inside cmd.
Maybe you could add the imagemap after the <cmd> in an <info> element?

Code: Select all

<step>
                <cmd></cmd>
                <info>
                    <imagemap id="imagemap_any_tvt_dvb">
                        <image id="image_bny_tvt_dvb"/>
                        <area>
                            <shape/>
                            <coords/>
                            <xref/>
                        </area>
                    </imagemap>
                </info>
            </step>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
afumo
Posts: 4
Joined: Tue Oct 11, 2022 3:39 pm

Re: Unexpected element

Post by afumo »

Thanks for your help.
I moved it from <cmd> and the error message went away.
afumo
Posts: 4
Joined: Tue Oct 11, 2022 3:39 pm

Re: Unexpected element

Post by afumo »

The error has gone but the boxes are not showing up in the .pdf output
What am I missing?
julien_lacour
Posts: 667
Joined: Wed Oct 16, 2019 3:47 pm

Re: Unexpected element

Post by julien_lacour »

Hello,

If you are using the DITA Map PDF - based on HTML5 & CSS transformation scenario, you need to set the "show.image.map.area.shapes" parameter (in the Parameters tab of the scenario) value to 'yes'.

Regards,
Julien
afumo
Posts: 4
Joined: Tue Oct 11, 2022 3:39 pm

Re: Unexpected element

Post by afumo »

Hi Julien,
Thanks for your help.
It took me some time to figure out where the parameter tab was
Post Reply