Loading ...
Sorry, an error occurred while loading the content.

Re: SVG, XSL, XML combinations??? - And Javascript

Expand Messages
  • don_xml@hotmail.com
    Marc, OK, here s where things get interesting. You are now mixing namespaces (XHTML and SVG) in one document, and trusting that the browser knows how to
    Message 1 of 5 , Mar 26, 2001
    • 0 Attachment
      Marc,

      OK, here's where things get interesting. You are now mixing
      namespaces (XHTML and SVG) in one document, and trusting that the
      browser knows how to handle them. The Script tag is part of both the
      XHTML and the SVG namespace, so the prefix (the svg: or xlink:) part
      of the tag will determine which namespace you want the tag to be
      associated with. In a browser where XHTML and SVG can co-exisit in
      the same document, IMHO, all scripting should be done in the XHTML
      namespace. To me the script run under the XHTML namespace would be
      native to the browser, but the script run under the SVG namespace
      will not be native and code be developed by someone other than the
      browser developer. Meaning, script run under XHTML might run
      differently than the script run under SVG, even if it should be the
      same (see the browser wars).

      With all of that said, we aren't there yet. The SVG tags really
      don't work in-line natively, we are fudging it thru the element
      behavior to the viewer. Script in the XHTML can run against the
      XHTML instance of the SVG tags, and it should transfer to the viewer,
      but I wouldn't count on decent performance, or that everything will
      work. So you should put the svg prefix in front of the script tags
      (within the svg block) and have it pushed thru to the viewer. The
      only problem is I don't remember if the script tags will pass thru
      the element behavior to the viewer. If it doesn't we will have to
      update it.


      Don XML

      --- In svg-developers@y..., evans_marc@j... wrote:
      > Cheers Don,
      >
      > Using the new version of the HTC I've finally got this to work.
      >
      > The problem that I'm having now is that I would like to use some
      > JavaScript in my SVG document which is actually inside an XSL
      > stylesheet, which is producing in-line XHTML.
      >
      > My goal is to produce a completely dynamic XML to SVG/XHTML
      graphical
      > interface. So the only way that I can think of producing some of
      the
      > interactivity is to use JavaScript. However if I enclose my SVG (or
      > Parts of it) in <Script> tags then it doesn't display this part of
      the
      > file.
      >
      > Anyone got any ideas,
      > Marc
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.