[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: again for variable from js to xslt
Laurence, That looks like it should work. But you might want to add the param before setting the input xml. I haven't tried it with a namespace so change myProc.addParameter("Switch",bSwitch,""); to myProc.addParameter("Switch",bSwitch); Ciao Chris XML/XSL Portal http://www.bayes.co.uk/xml >-----Original Message----- >From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx >[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of >laurence_zhang >Sent: 17 July 2001 12:58 >To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx >Subject: again for variable from js to xslt > > >the variable to be transfered(bSwitch) is a globle variable in a1.js. >and the input xml file is in a function(getfile(sXMLinput)) in a2.js. >how to put these sentences: > >var source = new ActiveXObject("MSXML2.DOMDocument.3.0"); >source.async = false; >source.load("http://localhost/Display.xsl"); >var XSLTemplate = new ActiveXObject("MSXML2.XSLTemplate.3.0"); >XSLTemplate.stylesheet = source.documentElement >var myProc = XSLTemplate.createProcessor(); >myProc.input = sXMLinput; >myProc.addParameter("Switch",bSwitch,""); >myProc.transform; > >Thank you very much! >______________________________________ > >=================================================================== >ÐÂÀËÃâ·Ñµç×ÓÓÊÏä (http://mail.sina.com.cn) >¶©ÔÄÊÖ»ú¶ÌÐÅÍ·ÌõÐÂÎÅ£¬ÌìÌì½±¶à¿îʱÉÐÊÖ»ú£¡ >(http://dailynews.sina.com.cn/c/272235.html) > >¶©ÔÄÊÖ»ú¶ÌÐŶ¥¼¶ÐÂÎÅÿÌìµÃпîÊÖ»ú´ó½±£¡ >(http://dailynews.sina.com.cn/c/266499.html) > > XSL-List info and >archive: http://www.mulberrytech.com/xsl/xsl-list > > 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
|