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

Sort>Filter/Modify whatever...

Subject: Sort>Filter/Modify whatever...
From: "Manos Batsis" <m.batsis@xxxxxxxx>
Date: Fri, 14 Dec 2001 14:39:04 +0200
sort filter
Hallo folks,

Here is a quick description of my problem.
I have an xml file that presents user rights as:

<USERS>
 <USER name="BUILTIN\Administrators" permission="Full"/>
 <USER name="Everyone" permission="Full"/>
 <USER name="Everyone" permission="none"/>
 <USER name="NT AUTHORITY\SYSTEM" permission="Full"/>
 <USER name="EDEVMINOAS\SQLUSR" permission="Read"/>
</USERS>

Notice the 2nd and 3rd USER elements, as they refer to the same user. I
need to find such groups sets bearing multiple occurences of a name, and
select a certain one based on my priorities (for example, 'none'
superseeds 'full').

As I have thought of it, for each element of name=*, I have to check for
elements with the same name, then look within their permission attr to
pic the one I want or build one if multiple same_name elements exist
with a combination of persmission attrs that should become one complex
one. For example
 <USER name="Everyone" permission="Full"/>
 <USER name="Everyone" permission="none"/>
Should become
 <USER name="Everyone" permission="none"/>

And 

 <USER name="Everyone" permission="read"/>
 <USER name="Everyone" permission="write"/>
Should become
 <USER name="Everyone" permission="read-write"/>

I would appreciate any similar code, or advice. Another subject is I
want to avoid proccessing the same element many times if it's not needed
(something that is rather blurred in my head at this point and for a
couple of days).

Thank you for your help,

Manos


 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.