Hi,
I am attempting to create hotspots using xslt. Can this be done? I have done several searches on the web and have come up with nada. I am very new to xslt and I am still learning the rules.
Here is a sample of the xml:
Here is a sample of the xslt:
Thanks.
I am attempting to create hotspots using xslt. Can this be done? I have done several searches on the web and have come up with nada. I am very new to xslt and I am still learning the rules.
Here is a sample of the xml:
Code:
<figure id="fig-0001">
<title>Module #1</title>
<graphic boardno="ICN-NSSMS-A-C2-30-50-1-53711-00057-A-01-S.gif" xlink:type="simple">
<hotspot coords="103,218,172,232" id="fig-0001-hot-0001" title="Module 6" visibility="visible">
<xref xlink:actuate="onRequest" xlink:href="NSSMS-A-C2-30-50-34A-054A-Z_001-" xlink:show="other" xlink:type="simple"/>
</hotspot>
</graphic>
</figure>
Here is a sample of the xslt:
Code:
<xsl:stylesheet version="1.0" xmlns:xlink="[URL unfurl="true"]http://www.w3.org/1999/xlink"[/URL] xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform"[/URL] xmlns:xq="[URL unfurl="true"]http://namespaces.softwareag.com/tamino/XQuery/result">[/URL]
<xsl:template match="graphic" mode="PageBody">
<xsl:attribute name="id">
<xsl:value-of select="$module-code"/>_
<xsl:value-of select="../@id"/>
</xsl:attribute>
<a name="{@id}"/>
<xsl:choose>
<xsl:when test="contains(@boardno,'.cgm')">
<xsl:call-template name="isoviewer"/>
</xsl:when>
<xsl:when test="contains(@boardno,'.avi')">
<a href="images/dmimages/{@boardno}">
Click here to play video.
</a>
</xsl:when>[COLOR=blue]
<xsl:when test="count(hotspot)>0">
<map id="map-0001" name="map-0001">
<xsl:for-each select="hotspot">
<area alt="@title" href="xref/@xlink:href" shape="rect" coords="@coords"/>
</xsl:for-each>
</map>
<img src="images/dmimages/{@boardno}" usemap="map-0001"/>
</xsl:when>[/color blue]
<xsl:otherwise>
<img src="images/dmimages/{@boardno}"/>
<br/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Thanks.