Index: /cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/interface/schema.dpml
===================================================================
--- /cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/interface/schema.dpml	(revision 3518)
+++ /cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/interface/schema.dpml	(revision 3518)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sequence debug="true">
+    <log>
+        <level>INFO</level>
+        <message>
+            <literal type="string">[interface.REST] [%1] requested schema with id: [%2]</literal>
+        </message>
+        <param>
+            <request>
+                <identifier>active:sloot.xpath2</identifier>
+                <argument name="operand">scratch:user</argument>
+                <argument name="operator">
+                    <literal type="string">string(/sc:user/@xml:id)</literal>
+                </argument>
+            </request>
+        </param>
+        <param>arg:schemaID</param>
+    </log>
+    <if>
+        <cond>
+            <request>
+                <identifier>active:isAuthorized</identifier>
+                <argument name="authorizedIDs">
+                    <request>
+                        <identifier>active:org.isocat.schemacat.access.data.schema.authorizedIDs</identifier>
+                        <argument name="schemaID">arg:schemaID</argument>
+                    </request>
+                </argument>
+                <argument name="authorizedRoles">
+                    <request>
+                        <identifier>active:org.isocat.schemacat.access.data.schemas.authorizedRoles</identifier>
+                    </request>
+                </argument>
+            </request>
+        </cond>
+        <then>
+            <request assignment="response">
+                <identifier>active:org.isocat.schemacat.access.data.schema</identifier>
+                <verb>SOURCE</verb>
+                <argument name="id">arg:schemaID</argument>
+            </request>
+        </then>
+        <else>
+            <request assignment="response">
+                <identifier>active:interface.rest.HTTPresponse.forbidden</identifier>
+            </request>
+        </else>
+    </if>
+    <sloot-debug>
+        <request>
+            <verb>SINK</verb>
+            <identifier>res:/debug/org.isocat.schemacat.interface.rest.schema.response.xml</identifier>
+            <argument name="primary">this:response</argument>
+        </request>
+    </sloot-debug>
+</sequence>
+
Index: /cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/module.xml
===================================================================
--- /cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/module.xml	(revision 3517)
+++ /cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/module.xml	(revision 3518)
@@ -46,5 +46,5 @@
                            <grammar>
                               <active>
-                                 <identifier>active:org.schemacat.user.json</identifier>
+                                 <identifier>active:org.schemacat.rest.user.json</identifier>
                                  <argument name="userID" min="1" max="1"/>
                                  <argument name="slash"/>
@@ -75,5 +75,5 @@
                            <grammar>
                               <active>
-                                 <identifier>active:org.schemacat.user.xml</identifier>
+                                 <identifier>active:org.schemacat.rest.user.xml</identifier>
                                  <argument name="userID" min="1" max="1"/>
                                  <argument name="slash"/>
@@ -99,5 +99,5 @@
                            <grammar>
                               <active>
-                                 <identifier>active:org.schemacat.users.json</identifier>
+                                 <identifier>active:org.schemacat.rest.users.json</identifier>
                                  <argument name="slash"/>
                               </active>
@@ -126,5 +126,5 @@
                            <grammar>
                               <active>
-                                 <identifier>active:org.schemacat.users.xml</identifier>
+                                 <identifier>active:org.schemacat.rest.users.xml</identifier>
                                  <argument name="slash"/>
                               </active>
@@ -148,5 +148,5 @@
                            <grammar>
                               <active>
-                                 <identifier>active:org.schemacat.user.schemas.json</identifier>
+                                 <identifier>active:org.schemacat.rest.user.schemas.json</identifier>
                                  <argument name="userID" min="1" max="1"/>
                                  <argument name="slash"/>
@@ -177,5 +177,5 @@
                            <grammar>
                               <active>
-                                 <identifier>active:org.schemacat.user.schemas.xml</identifier>
+                                 <identifier>active:org.schemacat.rest.user.schemas.xml</identifier>
                                  <argument name="userID" min="1" max="1"/>
                                  <argument name="slash"/>
@@ -201,5 +201,5 @@
                            <grammar>
                               <active>
-                                 <identifier>active:org.schemacat.schemas.json</identifier>
+                                 <identifier>active:org.schemacat.rest.schemas.json</identifier>
                                  <argument name="slash"/>
                               </active>
@@ -228,5 +228,5 @@
                            <grammar>
                               <active>
-                                 <identifier>active:org.schemacat.schemas.xml</identifier>
+                                 <identifier>active:org.schemacat.rest.schemas.xml</identifier>
                                  <argument name="slash"/>
                               </active>
@@ -250,5 +250,5 @@
                            <grammar>
                               <active>
-                                 <identifier>active:org.schemacat.schemas.public.json</identifier>
+                                 <identifier>active:org.schemacat.rest.schemas.public.json</identifier>
                                  <argument name="slash"/>
                               </active>
@@ -277,5 +277,5 @@
                            <grammar>
                               <active>
-                                 <identifier>active:org.schemacat.schemas.public.xml</identifier>
+                                 <identifier>active:org.schemacat.rest.schemas.public.xml</identifier>
                                  <argument name="slash"/>
                               </active>
@@ -284,4 +284,57 @@
                               <identifier>active:sloot.dpml</identifier>
                               <argument name="operator">res:/interface/publicSchemas.dpml</argument>
+                           </request>
+                        </endpoint>
+                        <endpoint>
+                           <meta>
+                              <rest>
+                                 <method>GET</method>
+                                 <simple>schemas/{schemaID:([^/]+)}{slash:(/|)}</simple>
+                                 <compress/>
+                                 <Etag>MD5</Etag>
+                                 <preTarget>findUser</preTarget>
+                                 <produces>application/json</produces>
+                              </rest>
+                           </meta>
+                           <grammar>
+                              <active>
+                                 <identifier>active:org.schemacat.rest.schema.json</identifier>
+                                 <argument name="schemaID" min="1" max="1"/>
+                                 <argument name="slash"/>
+                              </active>
+                           </grammar>
+                           <request>
+                              <identifier>active:JSONFromXML</identifier>
+                              <argument name="operand">
+                                 <request>
+                                    <identifier>active:sloot.dpml</identifier>
+                                    <argument name="operator">res:/interface/schema.dpml</argument>
+                                    <argument method="as-string" name="schemaID">arg:schemaID</argument>
+                                 </request>
+                              </argument>
+                           </request>
+                        </endpoint>
+                        <endpoint>
+                           <meta>
+                              <rest>
+                                 <method>GET</method>
+                                 <simple>schemas/{schemaID:([^/]+)}{slash:(/|)}</simple>
+                                 <compress/>
+                                 <Etag>MD5</Etag>
+                                 <preTarget>findUser</preTarget>
+                                 <produces>application/xml</produces>
+                              </rest>
+                           </meta>
+                           <grammar>
+                              <active>
+                                 <identifier>active:org.schemacat.rest.schema.xml</identifier>
+                                 <argument name="schemaID" min="1" max="1"/>
+                                 <argument name="slash"/>
+                              </active>
+                           </grammar>
+                           <request>
+                              <identifier>active:sloot.dpml</identifier>
+                              <argument name="operator">res:/interface/schema.dpml</argument>
+                              <argument method="as-string" name="schemaID">arg:schemaID</argument>
                            </request>
                         </endpoint>
