Subject: RE: [xsl] Filtering XML with XSL From: "Sam Awad" <sammy_awad@xxxxxxxxx> Date: Mon, 3 Feb 2003 09:37:44 -0700 |
Hi Steve, I would like the javascript code that will do the client side filtering using Active-X. I am using msxml2 version 3 in replace mode and the browser is IE6. I have been trying to do client side sorting and filtering using this script taken from www.bayes.co.uk : function filter(userFirstName){ try{ var s = new ActiveXObject("MSXML2.FreeThreadedDOMDocument"); var x = document.XMLDocument; if (x == null){ x = navigator.XMLDocument; s.loadXML(navigator.XSLDocument.xml); }else{ s.loadXML(document.XSLDocument.xml); } var tem = new ActiveXObject("MSXML2.XSLTemplate"); tem.stylesheet = s; var proc = tem.createProcessor(); proc.addParameter("userFirstName", userFirstName); proc.input = x; proc.transform(); var str = proc.output; var newDoc = document.open("text/html"); newDoc.write(str); navigator.XMLDocument = x; navigator.XSLDocument = s; newDoc.close(); }catch(exception){ } } I have incuded alerts all over the script and it craps on navigator.XMLDocument as undefined. Any help would be appreciated. Thanks Sam Awad -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Steve Gold Sent: Sunday, February 02, 2003 9:33 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] Filtering XML with XSL We do this running Microsoft Windows 2000 web server and XML 4.0 parser. Active Server Pages (ASP) does the transformation and it is very straightforward. We also have a non-ASP version that does the XML to XSL transformation using JavaScript but this works on Internet Explorer only as it uses an Active-X, etc. (We only really use that version when distributing the site on CD-ROM.) Our entire site is XML-based. As an example, one path visitors can take allows them to select a year, then see all the training courses for that year, grouped by month or topic. Then they can click a month and see a calendar for that month or a schedule for that course, etc. If your site will be running Windows 2000 web server, or if others are interested, I can provide the code. (Steve@xxxxxxxxxxxxx) It is all pretty cut and paste and works great. Hope this helps. -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of James Hunt Sent: Saturday, February 01, 2003 6:55 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] Filtering XML with XSL I would like to develop a web site that involve allowing a user to choose a value from a combo box and then connect them to a site that filters a xml file from which item they have selected. For Example: If the user has a combo box with zip codes in it. When they select a zip codethey are led to another site that only shows the records with the specified zip code. Can someone point me to the right direction? If someone knows a site that has an example like this please let me know. Thanks, James XML Example: <Addresses> <Address> <StreetAddress>My Street</StreetAddresss> <City>My City</City> <State>OHIO</State> <Zip>45111</Zip> </Address> <Address> <StreetAddress>My Street 2</StreetAddresss> <City>My City 2</City> <State>OHIO</State> <Zip>45141</Zip> </Address> <Address> <StreetAddress>My Street 3</StreetAddresss> <City>My City 3</City> <State>OHIO</State> <Zip>45211</Zip> </Address> </Addresses> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Filtering XML with XSL, Steve Gold | Thread | RE: [xsl] Filtering XML with XSL, Alan Flaherty |
[xsl] Variable assignment outside X, Delaney Robin | Date | Re: [xsl] N : M transformation, Tobias Reif |
Month |