Project | WXT | Basics | Download | Documentation | Samples

Images

When you use illustrations in your material, you will normally do it the straight forward way by introducing img-tags. But WXT offers an option that makes it simple to administrate many images in a simple way.

You may prepare one or more files that describes images, see Images , and use these images simply by using a image PI, see Image . The image PI also lets you define images for reuse and imagelists "on the fly".

All defined images, either by an images-file or by an image PI, may be selected for imagelists, Imagelist . An imagelist is a list of thumbe that may be expanded by mousenter.

An image file is validated according to the following scheme:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="image">
        <xs:complexType>
            <xs:choice maxOccurs="unbounded">
                <xs:element name="location"/>
                <xs:element name="width" minOccurs="0" maxOccurs="1"/>
                <xs:element name="height" minOccurs="0" maxOccurs="1"/>
                <xs:element name="subtext" minOccurs="0" maxOccurs="1"/>
                <xs:element name="alt" minOccurs="0" maxOccurs="1"/>
            </xs:choice>
            <xs:attribute name="id" type="xs:string"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="images">
        <xs:complexType>
            <xs:choice maxOccurs="unbounded">
                <xs:element ref="image" minOccurs="1" maxOccurs="unbounded"/>
            </xs:choice>
            <xs:attribute name="catalog" type="xs:string" use="optional"/>
        </xs:complexType>
    </xs:element>
</xs:schema>

The addresses , location - attribute of the images are supposed to be correct relative to the file. This may be changed by the catalog attribute in the root element images.

A sample image file:

<?xml version="1.0" encoding="utf-8"?>
<images catalog="http://www.ia.hiof.no/~borres/self">
<image id="bs-orig1">
    <location>bs1.png</location>
    <subtext>Selfportrait- 1</subtext>
</image>
<image id="bs-orig2">
    <location>bs2.png</location>
</image>
</images>