Atomik Xport SE: Reference > Chapter 12 Extracting Images, Captions and Copyright Information << >>

12.1 The image element declaration

To extract images you will need to include an image element declaration in your DTD. Previous versions of Atomik Xport required you to use the name ‘Image’ for your image element, but from Xport 4.3 you are free to choose any name. The only restriction is that your chosen element must have an empty content model. Your image element cannot use a style mapping; instead you can assign it the role of ‘Image element’ in the Ruleset Editor.

The following examples demonstrate image element declarations with attributes that could be used to capture information about the image on the page:

<!ELEMENT media-ref EMPTY> 
<!ATTLIST media-ref
imgName CDATA #IMPLIED
imgPath CDATA #IMPLIED
imgType CDATA #IMPLIED
colourmodel CDATA #IMPLIED
>

Below, we have based our image declaration on the XHTML model.

<!ELEMENT img EMPTY> 
<!ATTLIST img
alt CDATA #IMPLIED
src CDATA #IMPLIED
>

Note: A full list of the available image attributes can be found in Chapter 9 - Working with DTDs for Atomik Xport. These attibutes are applicable to your chosen image element.