Re: [xsl] XML access control by custom ID

Subject: Re: [xsl] XML access control by custom ID
From: ac <ac@xxxxxxxxxxxxx>
Date: Wed, 10 Mar 2010 01:36:53 -0500
Hi,

I believe that we understand what you have stated, and as Michael already asked you, "how do <administrator> and <anybody> come into play here?"

When you wish for output:

<a access="read; write" some_attributes="xyz" my_id="1">
  123
</a>

How does the stylesheet know if<a>  is "administrator" or "anybody" ?
Your output seems to imply that it is "anybody" but why? how? what about<b>?
How is that figured out, without having the output already? Or, if it based on the output being an input, what is the question?

Cheers,
ac




In the quoted example "administrator" and "anybody" are user roles.

In other words. I have 2 XML files. One containing data and another
containing user rights to this data. Data is marked with domain unique
id's to allow my system to trace usage of this data. The user rights
(or access control) file contains the id's of data items and the
rights that users have against these data items.

What I need is twofold:
1. filter the data based on what is visible to the user group
2. include the user rights as attributes on this filtered data

I have been struggling with this for a long time and cannot find a
good solution.

Regards,
Jacobus

Jacobus Reyneke schrieb am 09.03.2010 um 09:15:30 (+0200):
<a some_attributes="xyz" my_id="1">
   123
</a>
<b attribute="xxx" my_id="2">
   ABC
</b>

and the access controlling information is (in a separate file):
<userroles>
<administrator>
<read>
<my_id>1</my_id>
<my_id>2</my_id>
</read>
<write>
<my_id>1</my_id>
<my_id>2</my_id>
</write>
</administrator>
<anybody>
<read>
<my_id>1</my_id>
</read>
<write>
<my_id>1</my_id>
</write>
</anybody>
</useroles>

For this I need a stylesheet to filter and combine the data and access rights indicated by the access control data set. As an example, if I were to use the previous 2 xml files as input given a parameter of "anybody", then the resulting XML should look like:

<a access="read; write" some_attributes="xyz" my_id="1">
123
</a>
Well, and how do<administrator> and<anybody> come into play here?

--
Michael Ludwig

Current Thread