Re: Loading a resource document from script

Robin Berjon:
> Sorry for being thick but I'm not sure I understand your use case very 
> clearly. A side question that might seem unrelated to you but would help 
> me understand would be: given getURL, postURL, and parseXML (as 
> currently available in multiple SVG implementations) what would you be 
> missing to get your use case to work?

Sorry, here's a more concrete example:

    <xbl:definition element="ex:button">
        <handler ev:event="xbl:prebind">
	  var href = e.getAttributeNS(XLINKNS, "href");
	  var url = href.substring(0, href.indexOf("#"));
	  var frag = href.substring(href.indexOf("#") + 1);
	  var doc = ...; // load this url, not with getURL
	  var elt = doc.getElementById(frag);
	  // ... do something with the element
	    (EVNS, "DOMAttrModified", f, false, null);


Firstly, I don't want to load the resource document more than once.
(Ok, that could be cached by my script.)  But more importantly, I want
any attribute changes to that referenced element to trigger the event
handlers for my two button instances.  Those attribute changes might
come from script running in that resource document, or some script from
this document that happened to have access to that resource document
too.  getURL/parseXML isn't good here because it will load each time
and also it just returns a bit of static XML rather than a running SVG

  e-mail : cam (at)    	icq : 26955922
     web :	        msn : cam-msn (at)
  office : +61399055779		     jabber : heycam (at)

Received on Monday, 10 October 2005 23:25:06 UTC