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

Filtering using list of params (Subtree creation?)

Subject: Filtering using list of params (Subtree creation?)
From: "Chris Ward" <cward@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 19 Nov 2003 10:39:05 -0000
filtering a list
Hi,

First time posting - please forgive any duplication (I did look in the
archive).

I want to know if there is a preferred method of filtering out multiple
parts
of a large XML using some form of parameter list/document.

For illustration purposes I've created the following simple XML

<root>
	<store location="london">
		<staff>100</staff>
	</store>
	<store location="new york">
		<staff>200</staff>
	</store>
	<store location="paris">
		<staff>50</staff>
	</store>
	<store location="madrid">
		<staff>25</staff>
	</store>
	<store location="tokyo">
		<staff>125</staff>
	</store>
</root>


What I need if for different "views" to be available based on
the locations.

e.g. 

London Manager : sees London
Euro Manager   : sees London, Paris, Madrid
Global Manager : sees all

In my application I have some templates that do SUM() (currently 
for the entire document) to give some grand totals.  What I would
expect these to show using the example above is

London Manager : Staff = 100
Euro Manager   : Staff = 175
Global Manager : Staff = 500

So I'm thinking I need to select out the sections I required into
an xsl:variable and then apply the totals templates to that.

Also, what is the best way to express the filter list?  A separate
XML doc?  A comma delimited string param?

Any wisdom on this would be fantastic.

Many thanks,
Chris














Best regards
Chris

-- 

Chris Ward, Horizon Asset Limited
<mailto:cward@xxxxxxxxxxxxxxxxxxx>

 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.