RE: [xsl] Generating an overlib popup with XSL

Subject: RE: [xsl] Generating an overlib popup with XSL
From: cknell@xxxxxxxxxx
Date: Wed, 31 Aug 2005 11:12:02 -0400
The stylesheet you provided doesn't have anything that outputs a "onmouseover" event handler as you described in the body of your message. Where exactly do you want that to appear?
Charles Knell
cknell@xxxxxxxxxx - email

-----Original Message-----
From:     Achim Stdbler <achim@xxxxxxxxxxxx>
Sent:     Wed, 31 Aug 2005 16:22:14 +0200
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  [xsl] Generating an overlib popup with XSL

Hello List :)

I'm trying to generate a popup window using overlib.

basic outline:
<a onmouseover="overlib('*html source here*',*OPTIONS*);' onmouseout='return nd(); href="bla.html">...</a>

will show a popup window with the given source (i'd like to have a <div>...</div> there).
My problem: i need to generate the attribute onmouseover from several elements using xsl:for-each. AFAIk this is not possible in XSL. i have found a thread in the overlib forum that suggests using javascript variables for this task, but this seems very clumsy to me. is there no other way to achieve this?



PS: using xsltproc from libxml 20620 with XSLT 1.0 support.

xml (looks familiar for WoW junkies *g*):
<?xml version="1.0" encoding="UTF-8"?>
<item count="1" id="10362:0:1205:1846414464" mob="" name="Ornate Shield of the Bear" player="Merkles" points="" rarity="ff1eff00" type="Special-Shield">
<text align="left">Ornate Shield of the Bear</text>
<text align="left">Binds when equipped</text>
<text align="right">Shield</text>
<text align="left">Off Hand</text>
<text align="left">1776 Armor</text>
<text align="left">32 Block</text>
<text align="left">+9 Stamina</text>
<text align="left">+10 Strength</text>
<text align="left">Requires Level 53</text>

<?xml version="1.0" encoding="utf8"?>
<xsl:stylesheet xmlns:xsl=""; version="1.0">
<xsl:output method="html" version="1.0" encoding="iso-8859-1" indent="yes"/>
<xsl:template match="raid">
<xsl:for-each select="loot/item">
<xsl:sort select="@name"/>
<xsl:element name="tr">
<xsl:attribute name="class">row<xsl:value-of select="position() mod 2"/>
<a href="test.html">
<!--** how to get this block into an attribute? ** -->
<!--<xsl:attribute name="onmouseover"
<xsl:for-each select="tooltip/line">
<xsl:for-each select="text">
<xsl:element name="div">
name="class"><xsl:value-of select="@align"/></xsl:attribute>
</xsl:for-each><br />
<!--<xsl:attribute name="onmouseout">return
<span><xsl:value-of select="@name"/></span>
<td><xsl:value-of select="@player"/></td>
<td><xsl:value-of select="@count"/></td>
<xsl:when test="@points != ''">
<td><xsl:value-of select="@points"/></td>

Current Thread