123456 |
- // Licensed Materials - Property of IBM
- // IBM Cognos Products: hal
- // (C) Copyright IBM Corp. 2003, 2017.
- // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- XMLDocument.prototype._h31=function(){if(!this._h42){this._h42=C_XmlSerializer.F_ParseDefaultAttributes(this);}return this._h42;};XMLDocument.prototype.super_createElement=XMLDocument.prototype.createElement;XMLDocument.prototype.createElement=function(_h4Q1){var n=this.super_createElement(_h4Q1);if(this.doctype){var _hXX1=this._h31()[_h4Q1];if(_hXX1){for(var _hSA2 in _hXX1){n.setAttribute(_hSA2, _hXX1[_hSA2]);}}}return n;};XMLDocument.prototype.super_createElementNS=XMLDocument.prototype.createElementNS;XMLDocument.prototype.createElementNS=function(_h531,_hN8){var n=this.super_createElementNS(_h531, _hN8);if(this.doctype){var _hXX1=this._h31()[_hN8];if(_hXX1){for(var _hSA2 in _hXX1){n.setAttribute(_hSA2, _hXX1[_hSA2]);}}}return n;};XMLDocument.prototype.createNode=function(_hQT1,_hRF,_h531){switch(_hQT1){case U_XML.K_iNODE_ELEMENT:if(_h531&&_h531!=""){return this.createElementNS(_h531, _hRF);}return this.createElement(_hRF);case U_XML.K_iNODE_ATTRIBUTE:if(_h531&&_h531!=""){return this.createAttributeNS(_h531, _hRF);}return this.createAttribute(_hRF);case U_XML.K_iNODE_TEXT:return this.createTextNode("");case U_XML.K_iNODE_CDATA_SECTION:return this.createCDATASection("");case U_XML.K_iNODE_PROCESSING_INSTRUCTION:return this.createProcessingInstruction(_hRF, "");case U_XML.K_iNODE_COMMENT:return this.createComment("");case U_XML.K_iNODE_DOCUMENT_FRAGMENT:return this.createDocumentFragment();case U_XML.K_iNODE_ENTITY_REFERENCE:return null;case U_XML.K_iNODE_ENTITY:case U_XML.K_iNODE_DOCUMENT:case U_XML.K_iNODE_DOCUMENT_TYPE:case U_XML.K_iNODE_NOTATION:return null;default:return null;}};XMLDocument.prototype.nodeFromID=function(_hAE2){return this.getElementById(_hAE2);};XMLDocument.prototype.loadXML=function(_hTD2){var doc=(new DOMParser()).parseFromString(_hTD2, "text/xml");while(this.hasChildNodes()){this.removeChild(this.lastChild);}var _hBZ1=doc.childNodes.length;for(var i=0;i<_hBZ1;i++){this.appendChild(this.importNode(doc.childNodes.item(i), true));}return true;};Node.prototype.__defineGetter__("text",function(){if(this.nodeType==U_XML.K_iNODE_ATTRIBUTE){return this.value;}return this.textContent;});Node.prototype.__defineSetter__("text",function(s){if(this.nodeType==U_XML.K_iNODE_ATTRIBUTE){return this.value=s;}return this.textContent=s;});Node.prototype.selectSingleNode=function(_hV82){var doc=this.ownerDocument||this;var _hRT1=null;if(doc._h7G1){_hRT1={};_hRT1._h7G1=doc._h7G1;_hRT1._h6R=doc.createNSResolver(doc.documentElement);_hRT1.lookupNamespaceURI=function(_hS02){return this._h7G1[_hS02]||this._h6R.lookupNamespaceURI(_hS02);};}return doc.evaluate(_hV82, this, _hRT1, 9, null).singleNodeValue;};Node.prototype.selectNodes=function(_hV82){var doc=this.ownerDocument||this;var _hRT1=null;if(doc._h7G1){_hRT1={};_hRT1._h7G1=doc._h7G1;_hRT1._h6R=doc.createNSResolver(doc.documentElement);_hRT1.lookupNamespaceURI=function(_hS02){return this._h7G1[_hS02]||this._h6R.lookupNamespaceURI(_hS02);};}var _hR02=doc.evaluate(_hV82, this, _hRT1, 5, null);var a=[];for(var n=_hR02.iterateNext();n;n=_hR02.iterateNext()){a.push(n);}a.item=U_DOM.F_Item;return a;};XMLDocument.prototype.setProperty=function(_hKO1,_h552){if(_hKO1=="SelectionNamespaces"){this._hPA=_h552;this._h7G1={};var _h8G1=( _h552.indexOf( " " )==-1 )?[ _h552 ]:_h552.split( " " );for(var i=0;i<_h8G1.length;i++){var a=_h8G1[i].split("=");var _hS02=a[0].replace(/^xmlns:(.+)/, "$1");var _hYE2=a[1].replace( /['"](.+)['"]/, "$1" );this._h7G1[_hS02]=_hYE2;}}};XMLDocument.prototype.getProperty=function(_hKO1){return ((_hKO1=="SelectionNamespaces" )?( this._hPA||"" ):"" );};if(typeof document.activeElement=='undefined'){HTMLDocument.prototype.__defineGetter__("activeElement",function(){return window.h_elActiveElement;});};HTMLDocument.prototype.__defineGetter__("parentWindow",function(){return this.defaultView;});HTMLElement.prototype.contains=function(_hP72){return((this==_hP72)||(!!_hP72&&Boolean(this.compareDocumentPosition(_hP72)& 16)));};HTMLElement.prototype.__defineGetter__("parentElement",function(){return this.parentNode;});HTMLElement.prototype.__defineGetter__("onmousewheel",function(){return this._hZW||null;});HTMLElement.prototype.__defineSetter__("onmousewheel",function(_h7F2){if(this._hZW){this.removeEventListener('DOMMouseScroll', this._hZW, false);this._hZW=null;}if(_h7F2){this.addEventListener('DOMMouseScroll', _h7F2, false);this._hZW=_h7F2;}});HTMLElement.prototype.__defineGetter__("currentStyle",function(){return this.ownerDocument.defaultView.getComputedStyle(this, null);});HTMLElement.prototype.__defineSetter__("onreadystatechange",function(_h7F2){return this.onload=_h7F2;});HTMLElement.prototype.__defineGetter__("readyState",function(){return "complete";});HTMLElement.prototype.__defineGetter__("innerText",function(){return this.textContent;});HTMLElement.prototype.__defineSetter__("innerText",function(s){if(this.nodeName.toLowerCase()=="input"||this.nodeName.toLowerCase()=="textarea"){this.value=s;}else{var _h192=String( s ).F_HTMLEncode().replace( /\n/g, "<BR/>" ).replace( /\s\s/g, " " );return this.innerHTML=( _h192==" " )?" ":_h192;}});CSSStyleSheet.prototype.addRule=function(_hST1,_hH52,_h652){this.insertRule( _hST1+"{" + _hH52 + ";}", ( ( _h652==-1 )||( isNaN( _h652 ) ) )?this.cssRules.length:_h652 );return-1;};CSSStyleSheet.prototype.removeRule=function(_h652){this.deleteRule(_h652?_h652:0);};Element.prototype.super_removeAttribute=Element.prototype.removeAttribute;Element.prototype.removeAttribute=function(_hSA2){var n=this.super_removeAttribute(_hSA2);var d=this.ownerDocument;if(d.doctype&&!(d instanceof HTMLDocument)){var _hXX1=d._h31()[this.nodeName];if(_hXX1&&_hXX1[_hSA2]){this.setAttribute(_hSA2, _hXX1[_hSA2]);}}};if(!window["requestAnimationFrame"]){window.requestAnimationFrame=(window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame);};if(!window["cancelAnimationFrame"]){window.cancelAnimationFrame=(window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame);};
|