A
Aaron Gray
AFAICT FireFox SVG does not work with DOM Level 1 constructs, it needs
Namespaces.
Is this correct ?
Aaron
Namespaces.
Is this correct ?
Aaron
Aaron said:AFAICT FireFox SVG does not work with DOM Level 1 constructs, it needs
Namespaces.
Is this correct ?
SVG is XML with at least two namespaces (the SVG one:
http://www.w3.org/2000/svg, the XLink one: http://www.w3.org/1999/xlink)
and to manipulate XML with namespaces (with Mozilla or elsewhere) you need
at least the namespace aware DOM Level 2 Core. Mozilla supports that, even
before it supported SVG so I am not sure what the problem is.
Use namespace aware methods like document.createElementNS,
getElementsByTagNameNS, setAttributeNS with the proper namespaces and you
can script SVG in Mozilla just fine.
For more details see
<http://jwatt.org/svg/authoring/#namespace-aware-methods>.
Aaron said:Manipulating both MS IE Adobe SVG pluging and FF SVG in a single SVG
document.
Opera has no problem with scripting either the IE Adobe SVG documents or the
FF SVG documents.
But can I get MS and FF to play one the same document ? No not so far.
Aaron said:Manipulating both MS IE Adobe SVG pluging and FF SVG in a single SVG
document.
Martin Honnen said:I am not sure what the problem is for pure SVG, for IE and the Adobe SVG
plugin the DOM implementation that you script is provided by the Adobe
plugin and that implementation supports DOM Level 2 core
<http://home.arcor.de/martin.honnen/svg/test2006122201.svg>
Can you post example code that does not work? Or a URL where things go
wrong?
If you have code embedding SVG in HTML/XHTML then with IE and Adobe it is
only a question of getting at the Adobe SVG DOM document and using its DOM
Level 2 support.
the right - IMHO - way to handle IE.
Aaron said:This gives a blank page on IE7 with Adobe SVG.
Aaron said:<script type="text/ecmascript">
Yes, the ECMA Script seems to be the answer for doing DOM Level 2 code in
SVG. I have been using just <script> which only supports DOM Level 1.
The level of DOM support does certainly not depend on the type attribute
of the SVG script element. I use <script type="text/ecmascript" in SVG
instead of <script type="text/javascript"> in HTML as at least the Batik
squiggle SVG viewer prefers text/ecmascript, mainly because the SVG
specification (1.1) uses that as the media type name.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.