I see the XSLTForms source has many copies of lines like this

var body = XsltForms_browser.isXhtml ? 
document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml";, 
"body")[0] : document.getElementsByTagName("body")[0];
var selects = XsltForms_browser.isXhtml ? 
document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml";, 
"select") : document.getElementsByTagName("select");
var scriptelt = XsltForms_browser.isXhtml ? 
document.createElementNS("http://www.w3.org/1999/xhtml";, "script") : 
document.createElement("script");

At the moment I don't see any cases where isXhtml is true.

But if there are any, would it make sense add these three functions to 
XsltForms_browser conditionally based on isXhtml?

getElementByTagName : XsltForms_browser.isXhtml ? function (name) {
   return  
document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml";, name)[0]
} : function(name) { return document.getElementsByTagName(name)[0]; },

getElementsByTagName : XsltForms_browser.isXhtml ? function (name) {
   return  
document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml";, name)
} : function(name) { return document.getElementsByTagName(name); },

createElement : XsltForms_browser.isXhtml ? function (name) {
   return document.createElementNS("http://www.w3.org/1999/xhtml";, 
"script")
} : function (name) { return document.createElement("script"); },

Leigh.

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to