转自:http://stackoverflow.com/questions/3561270/error-on-line-39-at-column-26-namespace-prefix-xlink-for-href-on-script-is-not

SVG写入image标签时,发现在google和火狐上无法显示,且报错: Namespace prefix xlink for href on script is not defined

后经查询,找到了解决办法:

在命名空间上添加:

xmlns:xlink=http://www.w3.org/1999/xlink

实例:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" version="1.1"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" > <circle cx="" cy="" r="" stroke="black"
stroke-width="" fill="red"/> <image xlink:href="happy-every-day.jpg" width="" height="" /> </svg>

其中红色的命名空间是使google、火狐浏览器兼容SVG的,蓝色的部分是image标签适应google或火狐浏览器的。

SVG报错error on line 39 at column 26: Namespace prefix xlink for href on script is not defined的更多相关文章

  1. open数据库报错ERROR at line 1: ORA-03113: end-of-file on communication channel Process ID: 3880 Session ID: 125 Serial number: 3

    1.今天打开数据时,失败,报错 ERROR at line 1:ORA-03113: end-of-file on communication channelProcess ID: 3880Sessi ...

  2. windows 8 安装 oracle 11g 报错:command line option syntax error,type command/? for help

    windows 8 安装 oracle 11g 报错:command line option syntax error,type command/? for help 在windows8操作系统上安装 ...

  3. 【IntellJ IDEA】idea启动测试类报错Error running 'Test1.test': Command line is too long. Shorten command line for Test1.test or also for JUnit default configuration.

    idea启动测试类报错 Error running 'Test1.test': Command line is too long. Shorten command line for Test1.tes ...

  4. Hive 报错 Error while compiling statement: FAILED: ParseException line 1:0 character '' not supported here (state=42000,code=40000)

    Hive报错 Error while compiling statement: FAILED: ParseException line 1:0 character '' not supported h ...

  5. 运行springboot项目报错 Error running 'ResourceApplication': Command line is too long. Shorten comma

    方法1 IDEA 运行报错:Error running '***': Command line is too long 技术标签: IDEA     Error running 'Test': Com ...

  6. MySQL报错ERROR 1558 (HY000): Column count of mysql.user is wrong.

    MySQL报错ERROR 1558 (HY000): Column count of mysql.user is wrong. 1.今天在使用MySQL创建数据库时出现如下报错: mysql> ...

  7. [原]在使用ubuntu14.04,安装devstack的时候报错./stack.sh: line 463: generate-subunit: command not found

    =======在使用ubuntu14.04,安装devstack的时候报错./stack.sh: line 463: generate-subunit: command not found 2016- ...

  8. springboot启动报错,Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

    报错: Error starting ApplicationContext. To display the conditions report re-run your application with ...

  9. linux使用wkhtmltopdf报错error while loading shared libraries:

    官网提示 linux需要这些动态库.depends on: zlib, fontconfig, freetype, X11 libs (libX11, libXext, libXrender) 在li ...

随机推荐

  1. 【JAVAWEB学习笔记】30_WEB总结_思维导图

    可以在浏览器放大来查看细节,或者另存为图片到本地电脑查看.

  2. FastReport.Net使用:[23]图表(Chart)控件

    图表基本设置 1.拖放一个图表控件到报表设计界面中. 2.右键菜单“编辑”或者双击图表进入图表编辑器 3.将原有的簇状柱状图删除,添加圆环图 4.绑定数据源,并且指定X,Y轴数据. X轴数据为科目名称 ...

  3. 安卓 Activity Fragment 生命周期

    韩梦飞沙  韩亚飞  313134555@qq.com  yue31313  han_meng_fei_sha 活动:  创建->启动->获得焦点->暂停->停止->销毁 ...

  4. BZOJ4530 BJOI 2014 大融合

    对LCT子树大小进行维护. size表示实子树大小,sz表示虚子树大小. 具体操作是体现在link和splay中,可以看代码. 注意每次做完都要update. By:大奕哥 #include<b ...

  5. CodeForces - 1009E Intercity Travelling

    题面在这里! 可以发现全是求和,直接拆开算贡献就好了 #include<bits/stdc++.h> #define ll long long using namespace std; c ...

  6. 20162327WJH《程序设计与数据结构》课程总结

    20162327<程序设计与数据结构>课程总结 一.每周作业链接汇总 预备作业1:第一篇博客主要谈论了对本学期学习的展望,树立了一个目标. 预备作业2:简单的谈了谈自己的优势和一些成功的案 ...

  7. 【转载】Unicode 编码表

    转载备忘:Unicode 编码表 具体请移步: http://www.cnblogs.com/chenwenbiao/archive/2011/08/17/2142718.html

  8. 数组中找出最小的K个数

    题目 给出一个数组,找出K个最小的值 例如给出数组{5,2,4,3,1},给定K值3,则输出结果为{2,3,1} 程序 先给出第一个版本的程序 public static void printKNum ...

  9. PAT甲级1017. Queueing at Bank

    PAT甲级1017. Queueing at Bank 题意: 假设一家银行有K台开放服务.窗前有一条黄线,将等候区分为两部分.所有的客户都必须在黄线后面排队,直到他/她轮到服务,并有一个可用的窗口. ...

  10. mysql 绿色版安装

    1. 下载MySql5.6.10GA解压缩版,这就不多说也不上图了,下不到或者下好之后不知道如何解压的接下去的文章也没什么好多看的. 2. 解压好之后进入根目录是这样个情况(本人使用的是MySql5. ...