473,698 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FF SVG and DOM Level 1

AFAICT FireFox SVG does not work with DOM Level 1 constructs, it needs
Namespaces.

Is this correct ?

Aaron
Dec 22 '06 #1
10 2646
Aaron Gray wrote:
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.create ElementNS,
getElementsByTa gNameNS, 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>.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Dec 22 '06 #2
>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.
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.
Use namespace aware methods like document.create ElementNS,
getElementsByTa gNameNS, 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>.
Yes I have working examples of this.

Aaron
Dec 22 '06 #3
Aaron Gray wrote:
>>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.

Manipulating both MS IE Adobe SVG pluging and FF SVG in a single SVG
document.
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>

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.
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.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Dec 22 '06 #4
VK
Aaron Gray wrote:
Manipulating both MS IE Adobe SVG pluging and FF SVG in a single SVG
document.
An amount of IE users with Adobe SVG Viewer installed is totally
negligible (a few curious ones per maybe 10,000). And the idea that
every visitor will rush to install a 2.3Mb unknown discontinued plugin
is overly optimistic IMHO.

It is also still a mystery to me why does anyone think that with a
miracle happened and the given IE having some SVG plugin installed -
why will it necessary be Adobe SVG Viewer? It can be as well say Corel
SVG Viewer - with its "unlimited zoom" feature it could be the first
choice for some cartography-related intranet. See also
<http://www.carto.net/papers/svg/utils/SVGSwitch.shtml >

Having said all these nasties :-) -
Adobe SVG Viewer implements slightly different scriptable DOM model,
see for instance
<http://www.adobe.com/svg/demos/colorpicker/colorpicker.htm land
google for more samples
For a sophisticated sample of Adobe SVG Viewer scripting see
<http://www.lutanho.net/svgvml3d/index.html>. This also will show you
the right - IMHO - way to handle IE.

Dec 22 '06 #5
"Martin Honnen" <ma*******@yaho o.dewrote in message
news:45******** *************** @newsspool4.arc or-online.net...
Aaron Gray wrote:
>>>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.

Manipulating both MS IE Adobe SVG pluging and FF SVG in a single SVG
document.

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>
This gives a blank page on IE7 with Adobe SVG.
>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.

Can you post example code that does not work? Or a URL where things go
wrong?
I will do so soon, but I want to whittle what I have down first and do some
examples that work on IE and some that work on FF. BTW Opera does not seem
to be a problem.
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.
Right.

Thanks,

Aaron

Dec 22 '06 #6
<http://www.lutanho.net/svgvml3d/index.html>. This also will show you
the right - IMHO - way to handle IE.
This is great. Use VML for IE and SVG for browsers that support SVG. Very
obvious.

The IE code does a DOM Level 1, "createElem ent( 'v:group')" rather than a
DOM Level 2, "createElementN S( ns, tag)".

Great. Too obvious.

Thanks for the link,

Aaron

Dec 23 '06 #7
Aaron Gray wrote:
><http://home.arcor.de/martin.honnen/svg/test2006122201. svg>

This gives a blank page on IE7 with Adobe SVG.

That is possible, I have seen a lot of people complain that IE 7 and
Adobe SVG viewer somehow fail to render a standalone SVG document.
I use IE 6 and Adobe SVG viewer and the SVG renders fine.
Nevertheless that example contains a static text element and a
dynamically created circle element in the SVG document, if nothing is
rendered at all then it is not a problem with the DOM scripting but
simply a problem with IE 7 and Adobe SVG viewer not rendering an SVG
document at all if it is not embedded in aother document. I don't know a
solution for that problem.

Here is the same SVG document embedded in an HTML document, that should
do even with IE 7 and show that the DOM the Adobe SVG viewer offers
supports createElementNS and setAttributeNS:
<http://home.arcor.de/martin.honnen/svg/test2006122301. html>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Dec 23 '06 #8
Here is the same SVG document embedded in an HTML document, that should do
even with IE 7 and show that the DOM the Adobe SVG viewer offers supports
createElementNS and setAttributeNS:
<http://home.arcor.de/martin.honnen/svg/test2006122301. html>
Yes, thats working fine now.

<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 <scriptwhich only supports DOM Level 1.

Yes it works on IE6 and IE7 on XP and IE7 on Vista, all with Adobe plugin.

My only concern with this is whether all SVG clients support ECMA Script.
But as Adobe, FireFox and Opera support it I can see no reason not to use
it.

I will try the new EmiaSys Renesis plugin later today :-

http://www.emiasys.net/

Many thanks for your help,

Aaron

Dec 23 '06 #9
Aaron Gray wrote:
<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 <scriptwhich 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.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Dec 23 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8306
by: mike | last post by:
best regards: What is the difference between DOM Level 1 and DOM Level 2. Thank you. May god be with you.
3
2505
by: Ais | last post by:
Hi.. Presently i'm trying to install IBM Db2 Software on my Windows XP Operating systems. I'm using IBM(R) DB2(R) Universal Database Enterprise Server Edition, Version 8.1. After installation of the Above , i installed DB2 service Pack FP5_WR21334_ESE.
3
8670
by: Eric Porter | last post by:
Dear All, I have a VB6.COM program using a VB6.COM DLL, which in turn uses ADODB that performs various bits of SQL. I have re-written the VB6.COM DLL in C#.NET (with a VB6 shell), which uses the ADODB.Interop library supplied with .NET. The VB6.COM program above calls this C#.NET library in an effort to perform the equivalent functionality.
2
8132
by: kanda | last post by:
Hello. I am developing the application (VBA&ODBC, to be exact) which periodically calls the stored procedures in the IBM DB2. A few of the procedures require executing with isolation level RR ( ANSI "SERIALIZABLE" ), not the default; default is CS (ANSI "Read Committed")). The procedure language is SQL. According to the documentation, I can adjust procedure *run*-time isolation level by setting *compile*-time dataserver-wide option
2
1473
by: RanjitSingh.RS | last post by:
I have several Databases in a Instance . I want to a set particular Isolation Level for Only one read Only Database . Is it Possible to set a specific Isloation Level at a Database Level
6
4066
by: GrispernMix | last post by:
//ques and and level order traversal file name: lab6_build_leaf_up.cpp Instructions:
7
2830
by: GrispernMix | last post by:
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <conio.h> #include <iostream> #include <string.h> using namespace std; #define TRUE 1 #define FALSE 0
1
31193
by: Ruth413 | last post by:
Hello - I am getting the these errors in my sql 2005 generated script. I am stuck with first error. Please help.... Msg 102, Level 15, State 1, Line 3 Incorrect syntax near '('. Msg 319, Level 15, State 1, Line 11 Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.
6
4422
by: gskbond | last post by:
Following is my logic to traverse level by level an mway search tree.... (Yeah I finally used templates to implement a queue... :) ) void mWayTree:: TraverseLevelOrder(Node *root,int lvl) { int i; int level; Dq<Node *> Q; Node *tmp;
0
8668
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8598
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9014
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8885
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7708
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4358
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2320
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1995
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.