Added namespace to ARP schema. Added default namespace to ARP instances.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 24 Jan 2003 01:46:27 +0000 (01:46 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 24 Jan 2003 01:46:27 +0000 (01:46 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@414 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

15 files changed:
data/example1.xml [new file with mode: 0755]
data/example2.xml [new file with mode: 0755]
data/example3.xml [new file with mode: 0755]
data/example4.xml [new file with mode: 0755]
data/example5.xml [new file with mode: 0755]
data/example6.xml [new file with mode: 0755]
data/example7.xml [new file with mode: 0755]
data/example8.xml [new file with mode: 0755]
data/example9.xml [new file with mode: 0755]
src/edu/internet2/middleware/shibboleth/aa/arp/ArpTests.java
src/schemas/shibboleth-arp-1.0.xsd [moved from src/schemas/ARP.xsd with 85% similarity]
test/arp1.xml
test/arp2.xml
test/arp6.xml
test/arp7.xml

diff --git a/data/example1.xml b/data/example1.xml
new file mode 100755 (executable)
index 0000000..91d2c1a
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mace:shibboleth:arp:1.0" xsi:schemaLocation="urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd" >
+       <Description>Simplest possible ARP.</Description>
+       <Rule>
+               <Target>
+                       <AnyTarget/>
+               </Target>
+               <Attribute name="urn:mace:eduPerson:1.0:eduPersonAffiliation">
+                       <AnyValue release="permit"/>
+               </Attribute>
+       </Rule>
+</AttributeReleasePolicy>
diff --git a/data/example2.xml b/data/example2.xml
new file mode 100755 (executable)
index 0000000..74cd44c
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mace:shibboleth:arp:1.0" xsi:schemaLocation="urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd" >
+       <Description>Any Target.  One attribute any value. Another attribute with one value.</Description>
+       <Rule>
+               <Target>
+                       <AnyTarget/>
+               </Target>
+               <Attribute name="urn:mace:eduPerson:1.0:eduPersonPrincipalName">
+                       <AnyValue release="permit"/>
+               </Attribute>
+               <Attribute name="urn:mace:eduPerson:1.0:eduPersonAffiliation">
+                       <Value release="permit">member@example.edu</Value>
+               </Attribute>
+       </Rule>
+</AttributeReleasePolicy>
diff --git a/data/example3.xml b/data/example3.xml
new file mode 100755 (executable)
index 0000000..6570600
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mace:shibboleth:arp:1.0" xsi:schemaLocation="urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd" >
+       <Description>A specific SHAR and resource.</Description>
+       <Rule>
+               <Target>
+                       <Requester>shar.example.edu</Requester>
+                       <Resource>http://www.example.edu/</Resource>
+               </Target>
+               <Attribute name="urn:mace:eduPerson:1.0:eduPersonPrincipalName">
+                       <AnyValue release="permit"/>
+               </Attribute>
+               <Attribute name="urn:mace:eduPerson:1.0:eduPersonAffiliation">
+                       <Value release="permit">member@example.edu</Value>
+               </Attribute>
+       </Rule>
+</AttributeReleasePolicy>
diff --git a/data/example4.xml b/data/example4.xml
new file mode 100755 (executable)
index 0000000..484d1fb
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mace:shibboleth:arp:1.0" xsi:schemaLocation="urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd" >
+       <Description>A specific SHAR and resource.  A local attribute with one value and a reference to a shared attribute with one value.</Description>
+       <Rule>
+               <Target>
+                       <Requester>shar.example.edu</Requester>
+                       <Resource>http://www.example.edu/</Resource>
+               </Target>
+               <Attribute name="urn:mace:eduPerson:1.0:eduPersonAffiliation">
+                       <Value release="permit">member@example.edu</Value>
+               </Attribute>
+               <AttributeReference identifier="http://example.edu/attributes/attribute1"/>
+       </Rule>
+       <Attribute name="urn:mace:eduPerson:1.0:eduPersonAffiliation" identifier="http://example.edu/attributes/attribute1">
+               <Value release="permit">student@example.edu</Value>
+       </Attribute>
+</AttributeReleasePolicy>
diff --git a/data/example5.xml b/data/example5.xml
new file mode 100755 (executable)
index 0000000..501a3cb
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mace:shibboleth:arp:1.0" xsi:schemaLocation="urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd" >
+       <Description>Any Target.  One attribute with one value.</Description>
+       <Rule>
+               <Target>
+                       <AnyTarget/>
+               </Target>
+               <Attribute name="urn:mace:eduPerson:1.0:eduPersonAffiliation">
+                       <AnyValue release="permit"/>
+                       <Value release="deny">faculty@example.edu</Value>
+               </Attribute>
+       </Rule>
+</AttributeReleasePolicy>
diff --git a/data/example6.xml b/data/example6.xml
new file mode 100755 (executable)
index 0000000..a817403
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mace:shibboleth:arp:1.0" xsi:schemaLocation="urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd" >
+       <Description>Any Target.  One attribute with no values.</Description>
+       <Rule>
+               <Target>
+                       <AnyTarget/>
+               </Target>
+               <Attribute name="urn:mace:eduPerson:1.0:eduPersonAffiliation">
+                       <AnyValue release="deny"/>
+               </Attribute>
+       </Rule>
+</AttributeReleasePolicy>
diff --git a/data/example7.xml b/data/example7.xml
new file mode 100755 (executable)
index 0000000..4816951
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mace:shibboleth:arp:1.0" xsi:schemaLocation="urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd" >
+       <Description>A specific SHAR and a regex resource.</Description>
+       <Rule>
+               <Target>
+                       <Requester>shar.example.edu</Requester>
+                       <Resource matchFunction="urn:mace:shibboleth:arp:matchFunction:regexMatch">^https?://.+\.example\.edu/.*$</Resource>
+               </Target>
+               <Attribute name="urn:mace:eduPerson:1.0:eduPersonPrincipalName">
+                       <AnyValue release="permit"/>
+               </Attribute>
+               <Attribute name="urn:mace:eduPerson:1.0:eduPersonAffiliation">
+                       <Value release="permit">member@example.edu</Value>
+               </Attribute>
+       </Rule>
+</AttributeReleasePolicy>
diff --git a/data/example8.xml b/data/example8.xml
new file mode 100755 (executable)
index 0000000..8634162
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mace:shibboleth:arp:1.0" xsi:schemaLocation="urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd" >
+       <Description>A regex SHAR and a regex resource.</Description>
+       <Rule>
+               <Target>
+                       <Requester matchFunction="urn:mace:shibboleth:arp:matchFunction:regexMatch">shar[1-9]\.example\.edu</Requester>
+                       <Resource matchFunction="urn:mace:shibboleth:arp:matchFunction:regexMatch">^https?://.+\.example\.edu/.*$</Resource>
+               </Target>
+               <Attribute name="urn:mace:eduPerson:1.0:eduPersonPrincipalName">
+                       <AnyValue release="permit"/>
+               </Attribute>
+               <Attribute name="urn:mace:eduPerson:1.0:eduPersonAffiliation">
+                       <Value release="permit">member@example.edu</Value>
+               </Attribute>
+       </Rule>
+</AttributeReleasePolicy>
diff --git a/data/example9.xml b/data/example9.xml
new file mode 100755 (executable)
index 0000000..7b041d9
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mace:shibboleth:arp:1.0" xsi:schemaLocation="urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd" >
+       <Description>Combining a few Rules that might apply to the same target.</Description>
+       <Rule>
+               <Target>
+                       <AnyTarget/>
+               </Target>
+               <Attribute name="urn:mace:eduPerson:1.0:eduPersonAffiliation">
+                       <Value release="permit">member@example.edu</Value>
+               </Attribute>
+       </Rule>
+       <Rule>
+               <Target>
+                       <Requester matchFunction="urn:mace:shibboleth:arp:matchFunction:regexMatch">shar[1-9]\.example\.edu</Requester>
+                       <Resource matchFunction="urn:mace:shibboleth:arp:matchFunction:regexMatch">^https?://.+\.example\.edu/.*$</Resource>
+               </Target>
+               <Attribute name="urn:mace:eduPerson:1.0:eduPersonAffiliation">
+                       <Value release="permit">faculty@example.edu</Value>
+               </Attribute>
+       </Rule>
+       <Rule>
+               <Target>
+                       <Requester>shar.example.edu</Requester>
+                       <Resource>http://www.example.edu/example1/</Resource>
+               </Target>
+               <Attribute name="urn:mace:eduPerson:1.0:eduPersonAffiliation">
+                       <Value release="deny">faculty@example.edu</Value>
+               </Attribute>
+       </Rule>
+       <Rule>
+               <Target>
+                       <Requester>shar.example.edu</Requester>
+                       <Resource>http://www.example.edu/example2/</Resource>
+               </Target>
+               <Attribute name="urn:mace:eduPerson:1.0:eduPersonAffiliation">
+                       <AnyValue release="permit"/>
+               </Attribute>
+       </Rule>
+</AttributeReleasePolicy>
index 4e20dd9..536ae9c 100755 (executable)
@@ -106,15 +106,20 @@ public class ArpTests extends TestCase {
                        parser.setEntityResolver(new EntityResolver() {
                                public InputSource resolveEntity(String publicId, String systemId)
                                        throws SAXException {
-                                       InputStream stream;
-                                       try {
-                                               stream = new FileInputStream("src/schemas/ARP.xsd");
-                                               if (stream != null) {
-                                                       return new InputSource(stream);
+
+                                       if (systemId.endsWith("shibboleth-arp-1.0.xsd")) {
+                                               InputStream stream;
+                                               try {
+                                                       stream = new FileInputStream("src/schemas/shibboleth-arp-1.0.xsd");
+                                                       if (stream != null) {
+                                                               return new InputSource(stream);
+                                                       }
+                                                       throw new SAXException("Could not load entity: Null input stream");
+                                               } catch (FileNotFoundException e) {
+                                                       throw new SAXException("Could not load entity: " + e);
                                                }
-                                               throw new SAXException("Could not load entity: Null input stream");
-                                       } catch (FileNotFoundException e) {
-                                               throw new SAXException("Could not load entity: " + e);
+                                       } else {
+                                               return null;
                                        }
                                }
                        });
@@ -564,7 +569,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget/>"
@@ -614,7 +619,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget/>"
@@ -668,7 +673,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget/>"
@@ -722,7 +727,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget/>"
@@ -780,7 +785,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget/>"
@@ -840,7 +845,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget/>"
@@ -903,7 +908,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget/>"
@@ -961,7 +966,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget/>"
@@ -1021,7 +1026,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget/>"
@@ -1071,7 +1076,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget/>"
@@ -1124,7 +1129,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget/>"
@@ -1175,7 +1180,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <Requester>shar.example.edu</Requester>"
@@ -1226,7 +1231,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <Requester>shar.example.edu</Requester>"
@@ -1277,7 +1282,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <Requester>shar.example.edu</Requester>"
@@ -1328,7 +1333,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <Requester>shar.example.edu</Requester>"
@@ -1379,7 +1384,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <Requester>shar.example.edu</Requester>"
@@ -1430,7 +1435,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget />"
@@ -1506,7 +1511,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget/>"
@@ -1563,7 +1568,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget/>"
@@ -1614,7 +1619,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawSiteArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget/>"
@@ -1660,7 +1665,7 @@ public class ArpTests extends TestCase {
 
                String rawUserArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget/>"
@@ -1771,7 +1776,7 @@ public class ArpTests extends TestCase {
                //Gather the Input
                String rawSiteArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget/>"
@@ -1817,7 +1822,7 @@ public class ArpTests extends TestCase {
 
                String rawUserArp =
                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"ARP.xsd\">"
+                               + "<AttributeReleasePolicy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:mace:shibboleth:arp:1.0\" xsi:schemaLocation=\"urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd\">"
                                + "                     <Rule>"
                                + "                             <Target>"
                                + "                                     <AnyTarget/>"
similarity index 85%
rename from src/schemas/ARP.xsd
rename to src/schemas/shibboleth-arp-1.0.xsd
index 7048a0d..b084720 100755 (executable)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- edited with XML Spy v4.2 U (http://www.xmlspy.com) by Test (Test) -->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+<xs:schema targetNamespace="urn:mace:shibboleth:arp:1.0" xmlns:arp="urn:mace:shibboleth:arp:1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
        <xs:simpleType name="RequireType">
                <xs:restriction base="xs:string">
                        <xs:enumeration value="deny"/>
@@ -11,7 +11,7 @@
                <xs:sequence>
                        <xs:element name="AnyValue" minOccurs="0">
                                <xs:complexType>
-                                       <xs:attribute name="release" type="RequireType" use="required"/>
+                                       <xs:attribute name="release" type="arp:RequireType" use="required"/>
                                </xs:complexType>
                        </xs:element>
                        <xs:element name="Value" minOccurs="0" maxOccurs="unbounded">
@@ -20,7 +20,7 @@
                                                <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
                                        </xs:sequence>
                                        <xs:attribute name="matchFunction" type="xs:anyURI" default="urn:mace:shibboleth:arp:matchFunction:stringValue"/>
-                                       <xs:attribute name="release" type="RequireType" use="required"/>
+                                       <xs:attribute name="release" type="arp:RequireType" use="required"/>
                                </xs:complexType>
                        </xs:element>
                </xs:sequence>
@@ -71,7 +71,7 @@
                                                                        </xs:complexType>
                                                                </xs:element>
                                                                <xs:sequence>
-                                                                       <xs:element name="Attribute" type="AttributeType" minOccurs="0" maxOccurs="unbounded"/>
+                                                                       <xs:element name="Attribute" type="arp:AttributeType" minOccurs="0" maxOccurs="unbounded"/>
                                                                        <xs:element name="AttributeReference" minOccurs="0" maxOccurs="unbounded">
                                                                                <xs:complexType>
                                                                                        <xs:attribute name="identifier" type="xs:anyURI" use="required"/>
@@ -88,7 +88,7 @@
                                                </xs:complexType>
                                        </xs:element>
                                </xs:sequence>
-                               <xs:element name="Attribute" type="AttributeType" minOccurs="0" maxOccurs="unbounded"/>
+                               <xs:element name="Attribute" type="arp:AttributeType" minOccurs="0" maxOccurs="unbounded"/>
                        </xs:sequence>
                </xs:complexType>
        </xs:element>
index eec00c1..0efdf00 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ARP.xsd">
+<AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mace:shibboleth:arp:1.0" xsi:schemaLocation="urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd" >
        <Description>Simplest possible ARP.</Description>
        <Rule>
                <Description>Example Rule Description.</Description>
index b6d7952..b484206 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ARP.xsd">
+<AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mace:shibboleth:arp:1.0" xsi:schemaLocation="urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd" >
        <Rule>
                <Target>
                        <AnyTarget/>
index cacf2f7..5f97afa 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ARP.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+<AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mace:shibboleth:arp:1.0" xsi:schemaLocation="urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd" >
        <Description>Any Target.  One attribute with no values.</Description>
        <Rule>
                <Target>
index e71630e..cb69163 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ARP.xsd">
+<AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mace:shibboleth:arp:1.0" xsi:schemaLocation="urn:mace:shibboleth:arp:1.0 shibboleth-arp-1.0.xsd" >
        <Description>A specific SHAR and a regex resource.</Description>
        <Rule>
                <Target>