[svg-developers] Re: Detect native SVG support

2005-08-02 Thread Jim Ley

Mark Birbeck [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
But as you know, the SVG spec defines a large number of possible values to
test for with DOMImplementation, not just do you have SVG?. So ideally we
should be able to test for the language features we want, without using
hacks (sorry, I mean heuristic methods).

Right, so we agree that Mozilla SVG and SideWinder would be non-conformant 
and incorrect if they return true for http://www.w3.org/TR/SVG11/feature#SVG 
since they don't fulfill any of the sub ones.

Do they fulfil any of the sub-ones, I believe not, because to claim that 
they do, they have to meet:

... the viewer can process and render successfully all of the language 
features ...

Since they contain bugs and partial implementations, they should not claim 
any of the features.  Of course this problem is common to the entire feature 
string concept across all languages, but that's just unfortunate that it 
ever became a specifcation.

The HTML scripting world has shown how heuristic methods are extremely 
successful in dealing with different implementations, no-one uses the 
DOMImplementation interface, it's simply not acceptable due to the wild 
claims of some browsers (claiming support before there was only partial 
support) and the overly-prudent claims of others (claiming no-support when 
there was pretty good support)

Cheers,

Jim. 





 Yahoo! Groups Sponsor ~-- 
font face=arial size=-1a 
href=http://us.ard.yahoo.com/SIG=12hlnqdd7/M=362131.6882499.7825260.1510227/D=groups/S=1706030389:TM/Y=YAHOO/EXP=1123011190/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy/a./font
~- 

-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





RE: [svg-developers] Re: Detect native SVG support

2005-08-02 Thread Mark Birbeck
Jim,

Sidewinder wouldn't be conformant or non-conformant. We just pass a call to
the methods on a DOMImplementation to the implementations that we've
instantiated to create that implementation. In the case of an object that
'supports' SVG it would most likely be ASV (although it would depend on the
user's machine). So whether ASV (or whatever SVG plug-in is in use) is
non-conformant for claiming to support whatever feature strings it claims to
support, is something that I couldn't answer.

As to adding more and more hacks, no one doubts that you can keep adding
another line of script to test for yet another permutation. But as the world
of compound documents gets closer, don't you think that there needs to be a
generic solution that allows for testing not just for SVG, but for MathML,
XForms and so on? I recognise your criticisms of DOMImplementation, but at
some point we do need it to work...or rather it needs to be made to work.

All the best,

Mark


Mark Birbeck
CEO
x-port.net Ltd.

e: [EMAIL PROTECTED]
t: +44 (0) 20 7689 9232
w: http://www.formsPlayer.com/
b: http://internet-apps.blogspot.com/

Download our XForms processor from
http://www.formsPlayer.com/ 

 -Original Message-
 From: svg-developers@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On Behalf Of Jim Ley
 Sent: 02 August 2005 18:30
 To: svg-developers@yahoogroups.com
 Subject: [svg-developers] Re: Detect native SVG support
 
 
 Mark Birbeck [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
 But as you know, the SVG spec defines a large number of 
 possible values 
 to test for with DOMImplementation, not just do you have SVG?. So 
 ideally we should be able to test for the language features we want, 
 without using hacks (sorry, I mean heuristic methods).
 
 Right, so we agree that Mozilla SVG and SideWinder would be 
 non-conformant and incorrect if they return true for 
 http://www.w3.org/TR/SVG11/feature#SVG
 since they don't fulfill any of the sub ones.
 
 Do they fulfil any of the sub-ones, I believe not, because to 
 claim that they do, they have to meet:
 
 ... the viewer can process and render successfully all of the 
 language features ...
 
 Since they contain bugs and partial implementations, they 
 should not claim any of the features.  Of course this problem 
 is common to the entire feature string concept across all 
 languages, but that's just unfortunate that it ever became a 
 specifcation.
 
 The HTML scripting world has shown how heuristic methods are 
 extremely successful in dealing with different 
 implementations, no-one uses the DOMImplementation interface, 
 it's simply not acceptable due to the wild claims of some 
 browsers (claiming support before there was only partial
 support) and the overly-prudent claims of others (claiming 
 no-support when there was pretty good support)
 
 Cheers,
 
 Jim. 
 
 
 
 
 
  Yahoo! Groups Sponsor 
 ~-- font face=arial size=-1a 
 href=http://us.ard.yahoo.com/SIG=12hlnqdd7/M=362131.6882499.7
 825260.1510227/D=groups/S=1706030389:TM/Y=YAHOO/EXP=1123011190
 /A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
 Get Bzzzy! (real tools to help you find a job) Welcome to 
 the Sweet Life - brought to you by One Economy/a./font 
 --
 --~- 
 
 -
 To unsubscribe send a message to: 
 [EMAIL PROTECTED]
 -or-
 visit http://groups.yahoo.com/group/svg-developers and click 
 edit my membership
 
 Yahoo! Groups Links
 
 
 
  
 
 
 
 
 





 Yahoo! Groups Sponsor ~-- 
font face=arial size=-1a 
href=http://us.ard.yahoo.com/SIG=12hjjv13p/M=362131.6882499.7825260.1510227/D=groups/S=1706030389:TM/Y=YAHOO/EXP=1123012785/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy/a./font
~- 

-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [svg-developers] Re: Detect native SVG support

2005-08-02 Thread Bjoern Hoehrmann
* Mark Birbeck wrote:
As to adding more and more hacks, no one doubts that you can keep adding
another line of script to test for yet another permutation. But as the world
of compound documents gets closer, don't you think that there needs to be a
generic solution that allows for testing not just for SVG, but for MathML,
XForms and so on? I recognise your criticisms of DOMImplementation, but at
some point we do need it to work...or rather it needs to be made to work.

I certainly agree. Such facilities aren't cheap though, you need

  * Very clear well-defined conformance requirements
  * Extensive test suites for these facilities
  * Strong commitment to 100% compliance
  * Strong and reliable means to enforce compliance

At the moment, for SVG feature strings, we don't have any of that. In
fact, it's probably worse, there are still many authors who do not care
at all even about most basic conformance requirements like using well-
formed XML; many authors still think We usually find checking with
[IE, Opera and Firefox] is enough for our work. If we can't convince
authors to ensure their content is conforming, there is little hope to
convince implementers to code correctly.
-- 
Björn Höhrmann · mailto:[EMAIL PROTECTED] · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 


 Yahoo! Groups Sponsor ~-- 
font face=arial size=-1a 
href=http://us.ard.yahoo.com/SIG=12hiiuhpk/M=362131.6882499.7825260.1510227/D=groups/S=1706030389:TM/Y=YAHOO/EXP=1123020714/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy/a./font
~- 

-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [svg-developers] Re: Detect native SVG support

2005-07-29 Thread Mark Birbeck
Jonathan,

 ... and Mozilla happily returns true for both tests.

That's excellent news. I hadn't tried it, but that's good to hear.

We've also (almost) got the same thing working in our Sidewinder Viewer, so
hopefully this can become a general test that will indicate that you can
simply send XHTML with inline SVG (and of course there will be equivalent
tests for MathML, XForms and so on).

The next step is obviously to pack the same info into the MIME type, but
that's another story.
Regards,

Mark


Mark Birbeck
CEO
x-port.net Ltd.

e: [EMAIL PROTECTED]
t: +44 (0) 20 7689 9232
w: http://www.formsPlayer.com/
b: http://internet-apps.blogspot.com/

Download our XForms processor from
http://www.formsPlayer.com/





 Yahoo! Groups Sponsor ~-- 
font face=arial size=-1a 
href=http://us.ard.yahoo.com/SIG=12ha3oohc/M=362335.6886445.7839731.1510227/D=groups/S=1706030389:TM/Y=YAHOO/EXP=1122635015/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOOcmpgn=GRPRTP=http://groups.yahoo.com/;In
 low income neighborhoods, 84% do not own computers. At Network for Good, help 
bridge the Digital Divide!/a./font
~- 

-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [svg-developers] Re: Detect native SVG support

2005-07-29 Thread Holger Will
Jonathan Watt schrieb:

 I'm told that we are doing the right thing, and that not render
 doesn't mean not parse. Alternative content should still appear in
 the DOM as usual, and any img elements should have their content
 loaded. Hence the onload should fire. It seems a bit counter to what
 you'd expect, but there you go.

your are right, that sounds plausible, no matter if its visible or not 
it must be part of the dom, otherwise i would'nt be able to change the 
alternate content via script.
Marks solution seems like the cleanest . i will probably use this 
approach, if i need to test via script.

cheers
Holger


 On 7/28/05, Holger Will [EMAIL PROTECTED] wrote:
  i dont know what ive tested last time, but this indeed seems to work in
  IE and Opera, so this is probably  a bug in mozilla,
  in which component would i post this bug ?




 Yahoo! Groups Sponsor ~-- 
font face=arial size=-1a 
href=http://us.ard.yahoo.com/SIG=12hj7c04d/M=362131.6882499.7825260.1510227/D=groups/S=1706030389:TM/Y=YAHOO/EXP=1122642779/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy/a./font
~- 

-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[svg-developers] Re: Detect native SVG support

2005-07-29 Thread Martin Honnen
--- In svg-developers@yahoogroups.com, Jonathan Watt [EMAIL PROTECTED] wrote:

 You're quite right of course. This would be the *real* way to do it,
 and Mozilla happily returns true for both tests. 

But Mozilla gives true whether the preference svg.enabled is true or
not so currently the check Mark suggested does not help with Mozilla
trunk builds.
I think that is a bug and have filed
https://bugzilla.mozilla.org/show_bug.cgi?id=302640







 Yahoo! Groups Sponsor ~-- 
font face=arial size=-1a 
href=http://us.ard.yahoo.com/SIG=12hhqaeo8/M=362335.6886445.7839731.1510227/D=groups/S=1706030389:TM/Y=YAHOO/EXP=1122657527/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOOcmpgn=GRPRTP=http://groups.yahoo.com/;In
 low income neighborhoods, 84% do not own computers. At Network for Good, help 
bridge the Digital Divide!/a./font
~- 

-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [svg-developers] Re: Detect native SVG support

2005-07-28 Thread Jonathan Watt
First off, I've noticed that my suggested script doesn't work in IE6
since it doesn't seem to implement createElementNS. To prevent a
script error I'll revise my script to:

var hasNativeSVG = false;
try {
  if (document.createElementNS('http://www.w3.org/2000/svg','svg').width)
hasNativeSVG = true;
} catch (e) { /* ignore exception */ };


On 7/28/05, Holger Will [EMAIL PROTECTED] wrote:
 Hi Jonathan,
 
 in most cases i tend to favor the objectalternate content/object -
 syntax, which works without script.

Yup, but John asked for a script, so that's what I was trying to do.
Also the object approach will not differentiate between plug-in and
native support.

 i've tried the following without success, and i wonder if the behavior
 is specified like this or if its a bug.
 object ... 
 img ... onload=alert('SVG not supported')/
 /object

I thought you were trying not to rely on script support. j/k ;-)

 THIS DOES NOT WORK !
 the onload allways gets fired. is this right? do html clients allways
 load both the objects content and the alternate content ?
 is there another event that can be used ? is there any other specified
 way to determin if object renders the original content or the alternate
 content ?

Hmm, I'm not sure. That the onload get's evaluated seems like a bug to me.

-Jonathan


-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [svg-developers] Re: Detect native SVG support

2005-07-28 Thread Holger Will
Holger Will schrieb:

 Jonathan Watt schrieb:

  First off, I've noticed that my suggested script doesn't work in IE6
  since it doesn't seem to implement createElementNS. To prevent a
  script error I'll revise my script to:
 
  var hasNativeSVG = false;
  try {
if
  (document.createElementNS('http://www.w3.org/2000/svg','svg').width) 
 http://www.w3.org/2000/svg%27,%27svg%27%29.width%29
  http://www.w3.org/2000/svg%27,%27svg%27%29.width%29
  hasNativeSVG = true;
  } catch (e) { /* ignore exception */ };
 
 
  On 7/28/05, Holger Will [EMAIL PROTECTED] wrote:
   Hi Jonathan,
  
   in most cases i tend to favor the objectalternate 
 content/object -
   syntax, which works without script.
 
  Yup, but John asked for a script, so that's what I was trying to do.
  Also the object approach will not differentiate between plug-in and
  native support.

 i should have statet that this is a bit off topic. your script seems
 like a very clean and easy solution !

 
   i've tried the following without success, and i wonder if the behavior
   is specified like this or if its a bug.
   object ... 
   img ... onload=alert('SVG not supported')/
   /object
 
  I thought you were trying not to rely on script support. j/k ;-)

 i still do :-) i was just wondering ...

 
   THIS DOES NOT WORK !
   the onload allways gets fired. is this right? do html clients allways
   load both the objects content and the alternate content ?
   is there another event that can be used ? is there any other specified
   way to determin if object renders the original content or the 
 alternate
   content ?
 
  Hmm, I'm not sure. That the onload get's evaluated seems like a bug 
 to me.

 yeah it seems strange but at least mozilla, opera and ie agree on the
 behaviour :-)
 so even if mozilla would get this right, it would be as useless as
 contentDocument
 for cross browser detection of svg support.

 thanks for your comments anyways
 Holger

i dont know what ive tested last time, but this indeed seems to work in 
IE and Opera, so this is probably  a bug in mozilla,
in which component would i post this bug ?

Holger




-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





RE: [svg-developers] Re: Detect native SVG support

2005-07-28 Thread Mark Birbeck
Dear all,

We shouldn't really have to check for the existence of methods, etc. An HTML
DOM that can have SVG inline should really return true for one of:

  document.implementation.hasFeature(org.w3c.dom.svg, 1.0)

or:

 
document.implementation.hasFeature(http://www.w3.org/TR/SVG11/feature#SVG;,
1.1)

I haven't tried it, but I would say that's what Opera and Mozilla _should_
provide (and may well do).

Regards,

Mark



Mark Birbeck
CEO
x-port.net Ltd.

e: [EMAIL PROTECTED]
t: +44 (0) 20 7689 9232
w: http://www.formsPlayer.com/
b: http://internet-apps.blogspot.com/

Download our XForms processor from
http://www.formsPlayer.com/ 

 -Original Message-
 From: svg-developers@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On Behalf Of Holger Will
 Sent: 28 July 2005 19:38
 To: svg-developers@yahoogroups.com
 Subject: Re: [svg-developers] Re: Detect native SVG support
 
 Holger Will schrieb:
 
  Jonathan Watt schrieb:
 
   First off, I've noticed that my suggested script doesn't 
 work in IE6 
   since it doesn't seem to implement createElementNS. To prevent a 
   script error I'll revise my script to:
  
   var hasNativeSVG = false;
   try {
 if
   
 (document.createElementNS('http://www.w3.org/2000/svg','svg').width)
  http://www.w3.org/2000/svg%27,%27svg%27%29.width%29
   http://www.w3.org/2000/svg%27,%27svg%27%29.width%29
   hasNativeSVG = true;
   } catch (e) { /* ignore exception */ };
  
  
   On 7/28/05, Holger Will [EMAIL PROTECTED] wrote:
Hi Jonathan,
   
in most cases i tend to favor the objectalternate
  content/object -
syntax, which works without script.
  
   Yup, but John asked for a script, so that's what I was 
 trying to do.
   Also the object approach will not differentiate between plug-in 
   and native support.
 
  i should have statet that this is a bit off topic. your 
 script seems 
  like a very clean and easy solution !
 
  
i've tried the following without success, and i wonder if the 
behavior is specified like this or if its a bug.
object ... 
img ... onload=alert('SVG not supported')/ /object
  
   I thought you were trying not to rely on script support. j/k ;-)
 
  i still do :-) i was just wondering ...
 
  
THIS DOES NOT WORK !
the onload allways gets fired. is this right? do html clients 
allways load both the objects content and the alternate 
 content ?
is there another event that can be used ? is there any other 
specified way to determin if object renders the 
 original content 
or the
  alternate
content ?
  
   Hmm, I'm not sure. That the onload get's evaluated seems 
 like a bug
  to me.
 
  yeah it seems strange but at least mozilla, opera and ie 
 agree on the 
  behaviour :-) so even if mozilla would get this right, it 
 would be as 
  useless as contentDocument for cross browser detection of 
 svg support.
 
  thanks for your comments anyways
  Holger
 
 i dont know what ive tested last time, but this indeed seems 
 to work in IE and Opera, so this is probably  a bug in 
 mozilla, in which component would i post this bug ?
 
 Holger
 
 
 
 
 -
 To unsubscribe send a message to: 
 [EMAIL PROTECTED]
 -or-
 visit http://groups.yahoo.com/group/svg-developers and click 
 edit my membership
 
 Yahoo! Groups Links
 
 
 
  
 
 
 
 





-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [svg-developers] Re: Detect native SVG support

2005-07-28 Thread Jonathan Watt
Hi Mark,

You're quite right of course. This would be the *real* way to do it,
and Mozilla happily returns true for both tests. Opera doesn't support
scripting of SVG (yet) I believe, so the test won't work for it, but
as far as *script* testing goes this is definately the way to do it.

Thanks!
Jonathan


On 7/28/05, Mark Birbeck [EMAIL PROTECTED] wrote:
 Dear all,
 
 We shouldn't really have to check for the existence of methods, etc. An HTML
 DOM that can have SVG inline should really return true for one of:
 
   document.implementation.hasFeature(org.w3c.dom.svg, 1.0)
 
 or:
 
 
 document.implementation.hasFeature(http://www.w3.org/TR/SVG11/feature#SVG;,
 1.1)
 
 I haven't tried it, but I would say that's what Opera and Mozilla _should_
 provide (and may well do).
 
 Regards,
 
 Mark


-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [svg-developers] Re: Detect native SVG support

2005-07-28 Thread Jonathan Watt
I'm told that we are doing the right thing, and that not render
doesn't mean not parse. Alternative content should still appear in
the DOM as usual, and any img elements should have their content
loaded. Hence the onload should fire. It seems a bit counter to what
you'd expect, but there you go.

On 7/28/05, Holger Will [EMAIL PROTECTED] wrote:
 i dont know what ive tested last time, but this indeed seems to work in
 IE and Opera, so this is probably  a bug in mozilla,
 in which component would i post this bug ?


-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[svg-developers] Re: Detect native SVG support

2005-07-27 Thread jophof007
Hi,

Sounds as a solution. But Mozilla is trying to implement zoom and pan
things so a viewbox will appear in future I think.
It is not that easy to determine.

John
--- In svg-developers@yahoogroups.com, Jonathan Watt [EMAIL PROTECTED] wrote:
 Perhaps something like
 
   var hasNativeSVG =
 document.createElementNS('http://www.w3.org/2000/svg','svg').viewBox ?
 true : false;
 
 will do what you want? If the implementation doesn't support SVG, then
 the element it creates won't have a 'viewBox' property. There's
 probably a lighterweight way of doing this, but I haven't thought
 about it too deeply. ;-)
 
 
 On 7/23/05, jophof007 [EMAIL PROTECTED] wrote:
  Hi,
  
  Does anyone has a solution on detecting native svg support. Deer park
  Alpha 2 supports native svg. How can a client javascript detect that
  deerpark alpha 2 is running or how can a client javascript detect that
  native svg support is available?
  
  We like to make our diagram editor native svg compliant in
  open-modeing (http://open-modeing.sourceforge.net).
  
  Thanx in advance.
  
  John
  
  
  
  
  -
  To unsubscribe send a message to:
[EMAIL PROTECTED]
  -or-
  visit http://groups.yahoo.com/group/svg-developers and click edit
my membership
  
  Yahoo! Groups Links
  
  
  
  
  
  
 





-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [svg-developers] Re: Detect native SVG support

2005-07-27 Thread Jonathan Watt
Hi John,

Mozilla has supported the 'viewBox' property for a long time, but
let's forget about that. It would actually be better to use a property
that will almost certainly be implemented - the 'width' property seems
like a good candidate. So you would use:

var hasNativeSVG =
document.createElementNS('http://www.w3.org/2000/svg','svg').width ?
true : false;

I'm not sure I can explain why this should work any clearer than I
already have, but here goes. If the implementation doesn't support
SVG, then the element that's created as a result of the
createElementNS call *won't* have a 'width' property. If the
implementation does support SVG, then the element that's created as a
result of the createElementNS call *will* have a 'width' property.
This seems like a good way to test for native SVG support to me. If
you don't think so, can you have a go at explain why?

Regards,
Jonathan


On 7/27/05, jophof007 [EMAIL PROTECTED] wrote:
 Hi,
 
 Sounds as a solution. But Mozilla is trying to implement zoom and pan
 things so a viewbox will appear in future I think.
 It is not that easy to determine.
 
 John
 --- In svg-developers@yahoogroups.com, Jonathan Watt [EMAIL PROTECTED] 
 wrote:
  Perhaps something like
 
var hasNativeSVG =
  document.createElementNS('http://www.w3.org/2000/svg','svg').viewBox ?
  true : false;
 
  will do what you want? If the implementation doesn't support SVG, then
  the element it creates won't have a 'viewBox' property. There's
  probably a lighterweight way of doing this, but I haven't thought
  about it too deeply. ;-)
 
 
  On 7/23/05, jophof007 [EMAIL PROTECTED] wrote:
   Hi,
  
   Does anyone has a solution on detecting native svg support. Deer park
   Alpha 2 supports native svg. How can a client javascript detect that
   deerpark alpha 2 is running or how can a client javascript detect that
   native svg support is available?
  
   We like to make our diagram editor native svg compliant in
   open-modeing (http://open-modeing.sourceforge.net).
  
   Thanx in advance.
  
   John
  
  
  
  
   -
   To unsubscribe send a message to:
 [EMAIL PROTECTED]
   -or-
   visit http://groups.yahoo.com/group/svg-developers and click edit
 my membership
   
   Yahoo! Groups Links
  
  
  
  
  
  
  
 
 
 
 
 
 -
 To unsubscribe send a message to: [EMAIL PROTECTED]
 -or-
 visit http://groups.yahoo.com/group/svg-developers and click edit my 
 membership
 
 Yahoo! Groups Links
 
 
 
 
 
 



-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[svg-developers] Re: Detect native SVG support

2005-07-24 Thread Martin Honnen
--- In svg-developers@yahoogroups.com, Holger Will [EMAIL PROTECTED] wrote:
 jophof007 schrieb:
 
 
  Does anyone has a solution on detecting native svg support. Deer park
  Alpha 2 supports native svg. How can a client javascript detect that
  deerpark alpha 2 is running or how can a client javascript detect that
  native svg support is available?
 

 
 or you might check for the support of inlined SVG, this works in
mozilla and opera.
 
 ?xml version=1.0?
 html xmlns=http://www.w3.org/1999/xhtml; 
 head
  /head
   script
  function testSVG1(){
   
  var svg=document.getElementById(testSVG)
 if(svg.namespaceURI==http://www.w3.org/2000/svg;){
 alert(your broser supports inlined SVG)
 }
  }
  /script
 body onload=testSVG1()
 svg id=testSVG xmlns=http://www.w3.org/2000/svg/

I don't think that test above will tell you whether the browser
supports inline SVG, all you do is checking the namespaceURI property
of an element node in an XML document using elements in different
namespaces, any W3C DOM Level 2 implementation should do that whether
it knows about SVG or not. And you kind of check whether the browser
implements getElementById on that svg id=testSVG element but if
that is the intension then you should check the result of the
getElementById call before trying to access it as otherwise you can
create a script error.
For instance Opera 7.50 when served the above as application/xhtml+xml
will show the alert while it certainly does not know to render SVG.
Mozilla 1.7 does not show the alert but not because the test with the
namespace is any good to detect SVG support but because the
getElementById does not return an object but null and then the next
line gives a script error.





-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [svg-developers] Re: Detect native SVG support

2005-07-24 Thread Holger Will
Martin Honnen schrieb:

 --- In svg-developers@yahoogroups.com, Holger Will [EMAIL PROTECTED] wrote:
  jophof007 schrieb:
 
  
   Does anyone has a solution on detecting native svg support. Deer park
   Alpha 2 supports native svg. How can a client javascript detect that
   deerpark alpha 2 is running or how can a client javascript detect that
   native svg support is available?
  

 
  or you might check for the support of inlined SVG, this works in
 mozilla and opera.
 
  ?xml version=1.0?
  html xmlns=http://www.w3.org/1999/xhtml; 
  head
   /head
script
   function testSVG1(){
   
   var svg=document.getElementById(testSVG)
  if(svg.namespaceURI==http://www.w3.org/2000/svg;){
  alert(your broser supports inlined SVG)
  }
   }
   /script
  body onload=testSVG1()
  svg id=testSVG xmlns=http://www.w3.org/2000/svg/

 I don't think that test above will tell you whether the browser
 supports inline SVG, all you do is checking the namespaceURI property
 of an element node in an XML document using elements in different
 namespaces, any W3C DOM Level 2 implementation should do that whether
 it knows about SVG or not. And you kind of check whether the browser
 implements getElementById on that svg id=testSVG element but if
 that is the intension then you should check the result of the
 getElementById call before trying to access it as otherwise you can
 create a script error.
 For instance Opera 7.50 when served the above as application/xhtml+xml
 will show the alert while it certainly does not know to render SVG.
 Mozilla 1.7 does not show the alert but not because the test with the
 namespace is any good to detect SVG support but because the
 getElementById does not return an object but null and then the next
 line gives a script error.


Hi Martin

mmh yes it seems your are completely right, it was just an idea, i admit 
a bad one.
maybe the best way is to test for interdocument communication abilitys 
(SVGDocument / window)
like:
  http://jwatt.org/svg/demos/scripting-across-object.html
  http://jwatt.org/svg/demos/scripting-across-embed.html

cheers
Holger



-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/