Subject: [xsl] Re: Could the value of the select attribute of a xsl:param element be redefined? From: SFYang@xxxxxxxxxxxxx Date: Tue, 23 Jan 2001 09:21:08 +0800 |
Mr. Novatchev Thanks for your suggestions. As the matter of fact, using msxml3 I have tried the following two DOM approaches in writing the javascript. But none seems workable for me, I need your further directions. Thanks. 1. Jeni Tennison suggestions for Bharat dot Chintapally on Nov 18, 2000, function gotoprev() { var XMLDOM = new ActiveXObject("Msxml2.FreeThreadedDOMDocument"); XMLDOM.async = false; XMLDOM.load("test.xsl"); // <===Suggested by Jeni var s =XMLDOM.selectSingleNode("//xsl:param[@name='pageno']/@select"); // s.setAttribute("@select",'3'); alert(s.value);//<=== verify that select value =1 s.value=2; //<== manually defined value =2 alert(s.value); //<== verify the select value=2 alert(XMLDOM.xml); //== verify the complete xsl:param in the xsl file} However; when returing to xsl file, the select value is shown unchanged,i.e.,1 ,why? 2. Then I used the tip you responded to S.Fitzpatrick on Jan/19/01,to use the setAtrribute method. by adding s.setAttribute("@select",'3'); to the above function. But I get the error message of " this property or method is not supported". Do I miss something important in using these DOM approaches? ~ eMail : SFYang@xxxxxxxxxxxxx UniSVR Global Information Technology Corporation, -----原始資訊----- 從: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> 傳送: Sun, 21 Jan 2001 21:17:24 -0800 (PST) 收件人: "SFYang@xxxxxxxxxxxxx" <SFYang@xxxxxxxxxxxxx> 抄送: "xsl-list@xxxxxxxxxxxxxxxxxxxxxx" <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> 主題: Re: Could the value of the select attribute of a xsl:param element be redefined? SFYang at unisvr dot net dot tw wrote: > If so, how to do it? Be more specific, how to get > <xsl:param name="line" select="1"/> to <xsl:param name="line" > select="2"/> You can manipulate your stylesheet after loading it (but before applying the transformation) as any other xml document -- using DOM. Any attribute value can be modified in this way, including the value of the select attribute of the element in question. Or, the named template may be called with different xsl:with-param 's as determined dynamically within a <xsl:choose> element. Dimitre Novatchev. __________________________________________________ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: Could the value of the se, Dimitre Novatchev | Thread | [xsl] Any suggestions for using XSL, Kevin Duffey |
RE: [xsl] Matchin elements in text , Michael Kay | Date | Re: [xsl] Changing <b> to "[", Derek Ngok |
Month |