Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl]Putting Mouseover Javascript Script in XSLT?

From: David Carlisle <davidc@--------->
To:
Date: 9/4/2007 9:13:00 AM
>   However, when I scroll over the mouse, its arrows point up but does 
> not display the image. This is my modified code:


Don't try to debug (any) stylesheet by viewing what happens when the
result pf teh stylesheet is rendered in the browser, that is always a
painful way of working, as the browser is designed to give virtually no
diagnostic error messages.

The XSLt engine has almost no connection with teh rendering engine (even
if both are running in the browser) javascript is just text to XSLT.

XSLT is generating soME HTML with embedded javascript, you need to run
the XSLt outside the browser, and look at that generated HTML. If you
generated what you expected, but it doesn't work then your problem isn't
an XSLt one, but a javascript/html problem, and you need to find out
what javascript you do need. If the generated file is not what you
expect than you can rephrase your problem in terns that XSLt can
address, that is something like:
I wanted to generate <img src="wibble"> and the stylesheet generated
<img src=""> 

By teh way your xslt is a lot more verbose than needed, for example


            <img>
                <xsl:attribute name="src">BG008.jpg</xsl:attribute>
                <xsl:attribute name="alt">
                    <xsl:value-of select="./@alt"/>
                </xsl:attribute>
                <xsl:attribute name="id">
                    <xsl:value-of select="./@id"/>
                </xsl:attribute>
                <xsl:attribute name="width">150</xsl:attribute>
                <xsl:attribute name="height">113</xsl:attribute>
                <xsl:attribute name="border">0</xsl:attribute>
                <xsl:attribute name="name">Image 1</xsl:attribute>
            </img>
        </a>

could be


 <img src="BG008.jpg" alt="{@alt}" id="{@id}" width="150" height="113"
 border="0" name="Image 1"/>

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent