Convert xlink:href to href and ignore all other namespace attributes (resolves issue #68).

This commit is contained in:
Davide P. Cervone 2011-04-26 19:31:38 -04:00
parent bb09608b23
commit ba355d10bb
10 changed files with 20 additions and 17 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -12,5 +12,5 @@
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.InputJax.MathML=MathJax.InputJax({id:"MathML",version:"1.1",directory:MathJax.InputJax.directory+"/MathML",extensionDir:MathJax.InputJax.extensionDir+"/MathML",entityDir:MathJax.InputJax.directory+"/MathML/entities",config:{useMathMLspacing:false}});MathJax.InputJax.MathML.Register("math/mml");MathJax.InputJax.MathML.loadComplete("config.js");
MathJax.InputJax.MathML=MathJax.InputJax({id:"MathML",version:"1.1.1",directory:MathJax.InputJax.directory+"/MathML",extensionDir:MathJax.InputJax.extensionDir+"/MathML",entityDir:MathJax.InputJax.directory+"/MathML/entities",config:{useMathMLspacing:false}});MathJax.InputJax.MathML.Register("math/mml");MathJax.InputJax.MathML.loadComplete("config.js");

File diff suppressed because one or more lines are too long

View File

@ -24,7 +24,7 @@
MathJax.InputJax.MathML = MathJax.InputJax({
id: "MathML",
version: "1.1",
version: "1.1.1",
directory: MathJax.InputJax.directory + "/MathML",
extensionDir: MathJax.InputJax.extensionDir + "/MathML",
entityDir: MathJax.InputJax.directory + "/MathML/entities",

View File

@ -62,12 +62,15 @@
var type = node.nodeName.toLowerCase().replace(/^[a-z]+:/,"");
if (!(MML[type] && MML[type].isa && MML[type].isa(MML.mbase)))
{return MML.merror("Unknown node type: "+type)}
var mml = MML[type](), i, m, value;
var mml = MML[type](), i, m, name, value;
for (i = 0, m = node.attributes.length; i < m; i++) {
name = node.attributes[i].name;
if (name == "xlink:href") {name = "href"}
if (name.match(/:/)) continue;
value = node.attributes[i].value;
if (value.toLowerCase() === "true") {value = true}
else if (value.toLowerCase() === "false") {value = false}
mml[node.attributes[i].name] = value;
mml[name] = value;
}
for (i = 0, m = node.childNodes.length; i < m; i++) {
var child = node.childNodes[i];