⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 overview-summary-sarissa_ieemu_xslt.js.html

📁 sarissa用于支持多浏览器的浏览及编程
💻 HTML
📖 第 1 页 / 共 2 页
字号:
                <span class="comment">/* only nsIXSLTProcessorObsolete is available */</span>                xsltProcessor.transformDocument(<span class="reserved">this</span>, xslDoc, oResult, null);            };        }catch(e){            <span class="reserved">if</span>(xslDoc &amp;&amp; oResult)                throw <span class="literal">"Failed to transform document. (original exception: "</span>+e+<span class="literal">")"</span>;            <span class="reserved">else</span> <span class="reserved">if</span>(!xslDoc)                throw <span class="literal">"No Stylesheet Document was provided. (original exception: "</span>+e+<span class="literal">")"</span>;            <span class="reserved">else</span> <span class="reserved">if</span>(!oResult)                throw <span class="literal">"No Result Document was provided. (original exception: "</span>+e+<span class="literal">")"</span>;            <span class="reserved">else</span> <span class="reserved">if</span>(xsltProcessor == null)                throw <span class="literal">"Could not instantiate an XSLTProcessor object. (original exception: "</span>+e+<span class="literal">")"</span>;            <span class="reserved">else</span>                throw e;        };    };    <span class="comment">/**     * &lt;p&gt;&lt;b&gt;Deprecated, will be removed in 0.9.6 (use XSLTProcessor instead): &lt;/b&gt;Extends the Element class to emulate IE's transformNode (deprecated). &lt;/p&gt;     * &lt;p&gt;&lt;b&gt;Note &lt;/b&gt;: The result of your transformation must be well formed,     * otherwise you will get an error&lt;/p&gt;.      * <span class="attrib">@uses</span> Mozilla's XSLTProcessor         * <span class="attrib">@deprecated</span> use the XSLTProcessor instead     * <span class="attrib">@argument</span> xslDoc The stylesheet to use (a DOM Document instance)     * <span class="attrib">@returns</span> the result of the transformation serialized to an XML String     */</span>    XMLElement.<span class="reserved">prototype</span>.transformNode = <span class="reserved">function</span>(xslDoc){        var oDoc = document.implementation.createDocument(<span class="literal">""</span>, <span class="literal">""</span>, null);        Sarissa.copyChildNodes(<span class="reserved">this</span>, oDoc);        <span class="reserved">return</span> oDoc.transformNode(xslDoc);    };    <span class="comment">/**     * &lt;p&gt;&lt;b&gt;Deprecated, will be removed in 0.9.6 (use XSLTProcessor instead): &lt;/b&gt;Extends the Document class to emulate IE's transformNode (deprecated).&lt;/p&gt;     * &lt;p&gt;&lt;b&gt;Note &lt;/b&gt;: The result of your transformation must be well formed,     * otherwise you will get an error&lt;/p&gt;     * <span class="attrib">@uses</span> Mozilla's XSLTProcessor     * <span class="attrib">@deprecated</span> use the XSLTProcessor instead     * <span class="attrib">@argument</span> xslDoc The stylesheet to use (a DOM Document instance)     * <span class="attrib">@returns</span> the result of the transformation serialized to an XML String     */</span>    Document.<span class="reserved">prototype</span>.transformNode = <span class="reserved">function</span>(xslDoc){        var out = document.implementation.createDocument(<span class="literal">""</span>, <span class="literal">""</span>, null);        <span class="reserved">this</span>.transformNodeToObject(xslDoc, out);        var str = null;        try{            var serializer = new XMLSerializer();            str = serializer.serializeToString(out);        }catch(e){            throw <span class="literal">"Failed to serialize result document. (original exception: "</span>+e+<span class="literal">")"</span>;        };        <span class="reserved">return</span> str;    };    Sarissa.IS_ENABLED_TRANSFORM_NODE = true;};<span class="comment">/** * &lt;p&gt;Deprecated (use XSLTProcessor instead): Set xslt parameters.&lt;/p&gt; * &lt;p&gt;&lt;b&gt;Note &lt;/b&gt; that this method can only work for the main stylesheet and not any included/imported files.&lt;/p&gt; * <span class="attrib">@deprecated</span> use the XSLTProcessor instead * <span class="attrib">@argument</span> oXslDoc the target XSLT DOM Document * <span class="attrib">@argument</span> sParamName the name of the XSLT parameter * <span class="attrib">@argument</span> sParamValue the value of the XSLT parameter * <span class="attrib">@returns</span> whether the parameter was set succefully */</span>Sarissa.setXslParameter = <span class="reserved">function</span>(oXslDoc, sParamQName, sParamValue){    try{        var params = oXslDoc.getElementsByTagName(_SARISSA_IEPREFIX4XSLPARAM+<span class="literal">"param"</span>);        var iLength = params.length;        var bFound = false;        var param;        <span class="reserved">if</span>(sParamValue){            <span class="reserved">for</span>(var i=0; i &lt; iLength &amp;&amp; !bFound;i++){                <span class="reserved">if</span>(params[i].getAttribute(<span class="literal">"name"</span>) == sParamQName){                        param = params[i];                    <span class="reserved">while</span>(param.firstChild)                        param.removeChild(param.firstChild);                    <span class="reserved">if</span>(!sParamValue || sParamValue == null){                    }<span class="reserved">else</span> <span class="reserved">if</span>(typeof sParamValue == <span class="literal">"string"</span>){                         param.setAttribute(<span class="literal">"select"</span>, sParamValue);                        bFound = true;                    }<span class="reserved">else</span> <span class="reserved">if</span>(sParamValue.nodeName){                        param.removeAttribute(<span class="literal">"select"</span>);                        param.appendChild(sParamValue.cloneNode(true));                        bFound = true;                    }<span class="reserved">else</span> <span class="reserved">if</span> (sParamValue.item(0) &amp;&amp; sParamValue.item(0).nodeType){                        <span class="reserved">for</span>(var j=0;j &lt; sParamValue.length;j++)                            <span class="reserved">if</span>(sParamValue.item(j).nodeType)                                param.appendChild(sParamValue.item(j).cloneNode(true));                        bFound = true;                    }<span class="reserved">else</span>                        throw <span class="literal">"Failed to set xsl:param "</span>+sParamQName+<span class="literal">" (original exception: "</span>+e+<span class="literal">")"</span>;                };            };        };        <span class="reserved">return</span> bFound;    }catch(e){        throw e;        <span class="reserved">return</span> false;    };};</pre>	<hr><!-- ========== START OF NAVBAR ========== --><a name="navbar_top"><!-- --></a><table border="0" width="100%" cellpadding="1" cellspacing="0"><tr><td colspan=2 bgcolor="#b8cade" class="NavBarCell1"><a name="navbar_top_firstrow"><!-- --></a><table border="0" cellpadding="0" cellspacing="3">  <tr align="center" valign="top">      <td bgcolor="#b8cade" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>    <td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font>&nbsp;</td>  <td bgcolor="#b8cade" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>  <td bgcolor="#b8cade" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>  <td bgcolor="#b8cade" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>  </tr></table></td><td bgcolor="#b8cade" align="right" valign="top"><em><b>sarissa</b></em></td></tr><tr><td bgcolor="#eeeeee" class="NavBarCell2"><font size="-2">&nbsp;PREV&nbsp;&nbsp;NEXT</font></td><td bgcolor="#eeeeee" class="NavBarCell2"><font size="-2">  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>&nbsp;&nbsp;<script>  <!--  if(window==top) {    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');  }  //--></script><noscript><a href="allclasses-noframe.html" target=""><b>All Classes</b></a></noscript></font></td></tr></table><!-- =========== END OF NAVBAR =========== --><hr><font size="-1"></font><div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Thu Nov 30 22:06:11 2006</div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -