[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Filtering using list of params (Subtree creation?)
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
|
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
|