FF SVG和DOM Level 1 [英] FF SVG and DOM Level 1

查看:61
本文介绍了FF SVG和DOM Level 1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

AFAICT FireFox SVG无法使用DOM Level 1构造,它需要

命名空间。


这是正确的吗?

Aaron

解决方案

Aaron Gray写道:


AFAICT FireFox SVG它不适用于DOM Level 1构造,它需要

命名空间。


这是正确的吗?



SVG是具有至少两个名称空间的XML(SVG一个:
http://www.w3.org/2000/svg ,XLink one: http://www.w3.org/1999/xlink

并使用命名空间操纵XML(使用Mozilla或其他地方)你

至少需要名称空间感知的DOM Level 2 Core。 Mozilla支持

,甚至在它支持SVG之前,所以我不确定问题是什么。

使用名称空间感知方法,如document.createElementNS,

getElementsByTagNameNS,setAttributeNS具有正确的名称空间和

你可以在Mozilla中编写SVG脚本就好了。

有关详细信息,请参阅

< http ://jwatt.org/svg/authoring/#namespace-aware-methods>。

-


Martin Honnen
http://JavaScript.FAQTs.com/


> AFAICT FireFox SVG无法与DOM Level 1构造一起使用,它需要


>命名空间。

这是对的吗?



SVG是具有至少两个名称空间的XML(SVG一个:
http://www.w3.org/2000/svg ,XLink one: http://www.w3.org/1999/xlink

并使用命名空间操纵XML(使用Mozilla或其他地方)你需要

至少是名称空间感知的DOM Level 2 Core。在支持SVG之前,Mozilla支持这个,甚至支持
所以我不确定问题是什么。



在单个SVG中操作MS IE Adob​​e SVG插件和FF SVG

文件。


Opera在编写IE Adob​​e SVG文档或

FF SVG文档时没有问题。


但是我可以让MS和FF播放一个同一份文件?目前为止还没有。


使用名称空间感知方法,例如document.createElementNS,

getElementsByTagNameNS,setAttributeNS和正确的名称空间,并且

可以在Mozilla中编写SVG脚本。

有关详细信息,请参阅

< http://jwatt.org/svg/authoring/#namespace-知道的方法取代。



是的我有这方面的例子。


Aaron


< blockquote> Aaron Gray写道:


>> AFAICT FireFox SVG不适用于DOM 1级构造,需要
命名空间。

这是正确的吗?


SVG是具有至少两个名称空间的XML(SVG一个:
http://www.w3.org/2000/svg ,XLink one: http://www.w3.org/1999/xlink
并使用命名空间(使用Mozilla或其他地方)操作XML,你需要
至少是名称空间感知DOM Level 2 Core。 Mozilla支持这一点,甚至在它支持SVG之前,所以我不确定问题是什么。



在单个SVG

文档中操作MS IE Adob​​e SVG插件和FF SVG。



我不确定纯SVG的问题是什么,对于IE和Adobe SVG

插件你编写的DOM实现是由Adobe

插件提供,该实现支持DOM Level 2核心

< http://home.arcor.de/martin.honnen/svg/test2006122201.svg> ;


Opera可以编写IE Adob​​e SVG文档或

FF SVG文档的脚本。


但是我可以让MS和FF播放同一个文件吗?不,到目前为止。



你能发布不起作用的示例代码吗?或者一个东西去的地址

错了?如果您在HTML / XHTML中嵌入SVG代码,那么使用IE和

Adob​​e只需要获取Adobe SVG DOM文档和

使用其DOM Level 2支持。


-


Martin Honnen
http://JavaScript.FAQTs.com/


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

Is this correct ?

Aaron

解决方案

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

Martin Honnen
http://JavaScript.FAQTs.com/


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

Yes I have working examples of this.

Aaron


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/


这篇关于FF SVG和DOM Level 1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆