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

RE: Filtering XML with XSL

Subject: RE: Filtering XML with XSL
From: "Alan Flaherty" <alan@xxxxxxxxxxxxxxxxxx>
Date: Mon, 3 Feb 2003 19:57:14 -0000
filtering xml
Hi there,

If this data is being displayed in a table why not use the
TabularDataControl to display and filter the data, this has a set of
inbuilt methods for filtering and sorting the data, its quite simple to
use.

http://msdn.microsoft.com/workshop/database/tdc/reference/filter.asp

The TDC methods are very much like standard ado methods on a recordset
so they should look familiar.

With regards the code below, is there a XML dataIsland on the page
called XMLDocument with a XSL Stylesheet inside it??, this xsl file will
need to be customised to your own needs.




-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Sam Awad
Sent: 03 February 2003 16:38
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Cc: Steve@xxxxxxxxxxxxx
Subject: RE:  Filtering XML with XSL

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:  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:  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



 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.