This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Re: XSL - Javascript problem


Hello Annelies!

Sadly that is still an open bug in mozilla's xslt, see 
http://bugzilla.mozilla.org/show_bug.cgi?id=59912.
They say fix will be in the next mozilla milestone, dunno when it  will 
be in netscape.

Annelies Vercruysse wrote:

> Hi Oleg & xsl-List members, Thanx for your swift reply! Below you will 
> find my stylesheets, these are shortened versions but with the 
> functionality that I need. Normally the onLoadBody() must be executed 
> but Netscape 6.1 gives the "Error: onLoadBody() is not defined" in the 
> Javascript Console.
> 
> greetz, Annelies Vercruysse
> 
> XSL:----------------------------------------------------------------
> 
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0" 
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
> <xsl:template match="/">
> 
>  <html>
>  <head>
>  <title>Test page with javascript code</title>
> 
>  <script type="text/javascript">
>  function onloadBody() {
>     alert('When you see this, javascript works!');
>  }
>  </script>
> 
>  </head>
> 
>  <body onload="onloadBody();">
>    <table border="1">
>      <tr>
>        <th>Title</th>
>        <th>Artist</th>
>      </tr>
>      <xsl:for-each select="CATALOG/CD">
>      <tr>
>        <td><xsl:value-of select="TITLE" /></td>
>        <td><xsl:value-of select="ARTIST" /></td>
>      </tr>
>      </xsl:for-each>
>    </table>
>  </body>
> 
>  </html>
> 
> </xsl:template>
> </xsl:stylesheet>
> --------------------------------------------------------------------
> XML:----------------------------------------------------------------
> 
> <?xml version="1.0"?>
> <?xml-stylesheet type="text/xsl" href="test.xsl"?>
> <CATALOG>
>  <CD>
>    <TITLE>Hide your heart</TITLE>
>    <ARTIST>Bonnie Tyler</ARTIST>
>  </CD>
>  <CD>
>    <TITLE>Greatest Hits</TITLE>
>    <ARTIST>Dolly Parton</ARTIST>
>  </CD>
>  <CD>
>    <TITLE>Still got the blues</TITLE>
>    <ARTIST>Gary Moore</ARTIST>
>  </CD>
> </CATALOG>

-- 
Oleg Tkachenko
Multiconn International, Israel


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]