[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re:Re: Could the value of the select attribute of a xs

Subject: Re:Re: Could the value of the select attribute of a xsl:param element be redefined?
From: SFYang@xxxxxxxxxxxxx
Date: Thu, 25 Jan 2001 00:08:35 +0800
dom select value
Mr. Novatchev

1.Thanks for your pointing out my basic error of manipulating the dom  within the stylesheet.
 You have a good guess on my intention.

2. Actually, I have provided the detailed problem posted on xslt-list Jan/21/01 which includes xml and xsl docmument.
It was untitled, however Michael Kay responded to my question titled as RE: paging to next and previous page (was untitled) on Jan/21/2001. 
Please go over these lists to get a clear picture on what I am after.

3.  I tried to write a xslt document to display outputs of the next or prev page.
Key's response gives part of solutions. Besides,I think I need a mechanism to be 
able to supply page number as the key parameter of the output. 
Taking your suggestion, I should seriously consider using xsl:choose  
as the best solution.  

4. More help will be appreciated, after you review the detailed descriptions of my problem.

~
eMail : SFYang@xxxxxxxxxxxxx

UniSVR Global Information Technology Corporation, 



-----原始資訊-----
從:	"Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
傳送:	Mon, 22 Jan 2001 21:11:23 -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?

>          
>         However; when returing to xsl file, the select value is shown
> unchanged,i.e.,1 ,why?
> 

1. You've made a very basic error -- this dom manipulation must be
carried out ***before*** you invoke transformNode()

>From the above citation it seems obvious that you're calling this
script from within the stylesheet -- this is wrong -- you're performing
the changes on another, newly created instance of your parsed
stylesheet -- when the script returns it dies away.

2. You haven't provided any details of your code -- nobody can even
guess what you were actually doing.

Remember the recommendation, that in your case a simple xsl:choose
element is the best solution.

Dimitre.


--- SFYang@xxxxxxxxxxxxx wrote:
> 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/


__________________________________________________
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.