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

how to do set operations (intersection, unify, relativ

Subject: how to do set operations (intersection, unify, relative compelent) on sequences (or any other possible structure); runtime dynamical structures?
From: "Mtekel" <thx@xxxxxxxxx>
Date: Sun, 10 May 2009 20:15:51 +0200
 how to do set operations (intersection

I have a another question:
I have one sequence. In runtime I generate another one.
Now I need a relative complement of the first to the second (all the items
that are in 1st sequence, but are not in the second).
The first sequence for me is tags that I need to generate in the output. The
second sequence is tags that I have found data for in input, have processed
them and have generated tags to output. The relative complement is then the
set of tags of which data I did not encounter while processing input, thus I
need to generate them with some default values.

Is there some good way to do so? Should I be using some other structure
instead of sequences? (now I have a sequence of strings that represent XML

Or other way, is it possible to extract items from the sequence in runtime?
E.g. in a for-each loop? So that in the end that sequence will contain only
those tags that I did not find data for. The problem I have now is if I use
remove($list,index), then it returns a new list without that item. I cannot
change the original list itself, the only thing I can do now to remember
this newly generated list is to recursively call the same function again and
give it this new list as the parameter. However I see this as very
uneffective, since then the function will start the for-each loop again from
the first node and go through all the already processed data again...

The only way I have found to dynamically preserve in-loop generated data is
to <xsl:variable>
	<xsl:for each>
		<xsl:sequence>    <--here I dynamically add data to that
	</for each>

Thanks again for any advice,


Current Thread


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.
First Name
Last Name
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.