Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: data set operation - remove nodes from one data set that have nodes that exist in another data set >Thread Next - Re: data set operation - remove nodes from one data set that have nodes that exist in another data set Re: data set operation - remove nodes from one data set that have nodes that exist in another data setTo: NULL Date: 7/27/2008 9:38:00 AM On Jul 27, 4:07=A0am, "Joe Fawcett" <joefawc...@newsgroup.nospam> wrote: > "vanSkier" <rod_K...@hotmail.com> wrote in message > > news:93194946-7233-430e-a8d1-23d6442c1cdc@f......= > Hello, > > > I'd like to uses xsl to process one set of nodes and for each node > > that exists in that data set: =A0determine if that node exists in a > > second set of nodes and if it exists there remove it from the first > > data set. > > > Does any one have any ideas on the most efficient way to approach > > this? =A0If anyone has seen an example of this I'd much appreciate the > > url where it's demonstrated. > > > Than you very much. > > > Rod > > If I were doing this in XSLT I'd use one of the documents as the source a= nd > bring the reference one in via the document() function. > Then I'd copy all nodes except the referenced ones. The difficulty would = be > to determine the matching nodes, can you show a small example of the two > documents and the output you need? > > The second question is you say you are using a data set, does this mean a= n > ADO.NET dataset rather than XML files? > > -- > > Joe Fawcett (MVP - XML)http://joe.fawcett.name Thanks Joe. Here's an example below, if an item of set 2 is found in set 1 then remove if from set 1. I'm relatively new to xsl and see there's a key function and maybe that could be used do determine which nodes to copy. The source could be a relational store but was trying to be safe and build this agnostic to source. Rod SOURCE DATA ----------- <datasets> <dataset set=3D"1"> <data>Company 1</data> <data>Company 2</data> <data>Company 3</data> <data>Company 4</data> <data>Company 5</data> </dataset> <dataset set=3D"2"> <data>Company 1</data> <data>Company 2</data> <data>Company 5</data> </dataset> </datasets> RESULT DATA ----------- <datasets> <dataset set=3D"result"> <data>Company 3</data> <data>Company 4</data> </dataset> </datasets> | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
