W3C home > Mailing lists > Public > www-svg@w3.org > August 2009

Substitute for onload event in XSLT-generated graphics

From: Rüdiger Plantiko <ruediger.plantiko@astrotexte.ch>
Date: Tue, 25 Aug 2009 09:05:12 +0200 (CEST)
Message-ID: <17608.193.8.177.17.1251183912.squirrel@webmail22.mirsky.de>
To: www-svg@w3.org
Hi,

the SVG scripting specification defines that the onload event handler is
*only called for parsed nodes*. A similar event for XSLT-generated
graphics should be available as a substitute, since they are not parsed.

See my example page http://www.astrotexte.ch/sources/svgonload.html which
illustrates the problem, and the textual description of the problem in
https://bugzilla.mozilla.org/show_bug.cgi?id=386856 – they were right to
refuse this bug.

Basically, I want to separate data layer and presentation layer by keeping
only the data in the XML and doing the processing of the graphics in an
XSL style sheet. Since XSLT is ill-suited for trigonometric calculations
and similar operations, a scripting language has to be invoked during this
processing.

This can only work, however, if there exists an appropriate substitute for
the onload event or if the definition of onload is extended to this
context.

- Rüdiger Plantiko

Example XML file (data layer):

------------------------------------------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="horo.xsl" type="text/xsl"?>
<horoscope>
  <planets>
    <so>335.3</so>
    <mo>52.2</mo>
    <me>313.5</me>
    <ve>10.7</ve>
    <ma>329.7</ma>
    <ju>18.2</ju>
    <sa>325.15</sa>
    <ur>158.3</ur>
    <ne>227.9</ne>
    <pl>163.25</pl>
  </planets>
  <houses>
    <asc>211</asc>
    <h2>238</h2>
    <h3>273</h3>
    <ic>312</ic>
    <h5>346</h5>
    <h6>11.5</h6>
  </houses>
</horoscope>
------------------------------------------------------------
Received on Tuesday, 25 August 2009 16:15:44 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:43 GMT