[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Could the value of the select attribute of a xsl:p
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, -----ì©l¸ê°T----- ±q: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> ¶Ç°e: Sun, 21 Jan 2001 21:17:24 -0800 (PST) ¦¬¥ó¤H: "SFYang@xxxxxxxxxxxxx" <SFYang@xxxxxxxxxxxxx> §Û°e: "xsl-list@xxxxxxxxxxxxxxxxxxxxxx" <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> ¥DÃD: 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|