Changeset 4369
- Timestamp:
- 01/28/14 17:21:50 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/interface/schemaAuthorizedIDs.dpml
r3879 r4369 41 41 <argument name="operator"> 42 42 <literal type="xml"> 43 <ids xmlns:sc="http://www.isocat.org/ns/schemacat">{ 44 for $userID in $schemaMetadata//sc:schema/sc:access/sc:user/@ref 45 return <id>{string($userID)}</id> } 46 </ids> 43 <!--Code for active:xquery--> 44 <!--declare namespace sc = "http://www.isocat.org/ns/schemacat"; 45 declare variable $schemaMetadata external; 46 47 element ids { 48 for $user in $schemaMetadata/sc:schema/sc:access/* 49 return if (name($user) eq 'sc:all' and contains($user/@actions,'r')) 50 then element id { 51 attribute actions{$user/@actions}, 52 'ALL' 53 } 54 else ( element id { 55 attribute actions{$user/@actions}, 56 attribute role{$user/@role}, 57 string($user/@ref) 58 } 59 ) 60 }--> 61 <ids xmlns:sc="http://www.isocat.org/ns/schemacat">{ 62 for $user in $schemaMetadata/sc:schema/sc:access/* 63 return if (name($user) eq 'sc:all' and contains($user/@actions ,'r')) 64 then <id actions="{data($user/@actions)}">ALL</id> 65 else <id actions="{data($user/@actions)}" 66 role="{data($user/@role)}">{string($user/@ref)}</id> 67 } 68 </ids> 47 69 </literal> 48 70 </argument>
Note: See TracChangeset
for help on using the changeset viewer.