Reorder special plugins.
authorScott Cantor <cantor.2@osu.edu>
Wed, 20 May 2009 16:18:42 +0000 (16:18 +0000)
committerScott Cantor <cantor.2@osu.edu>
Wed, 20 May 2009 16:18:42 +0000 (16:18 +0000)
schemas/shibboleth-2.0-attribute-map.xsd
shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp

index 72460f2..badef3b 100644 (file)
         </annotation>
         <complexType>
             <sequence>
-                <element name="Attribute" type="am:AttributeType" maxOccurs="unbounded"/>
                 <element name="MetadataProvider" type="am:PluggableType" minOccurs="0"/>
                 <element name="TrustEngine" type="am:PluggableType" minOccurs="0"/>
                 <element name="AttributeFilter" type="am:PluggableType" minOccurs="0"/>
+                <element name="Attribute" type="am:AttributeType" maxOccurs="unbounded"/>
             </sequence>
             <attribute name="metadataPolicyId" type="am:string"/>
         </complexType>
index 8717171..1b8a7de 100644 (file)
@@ -220,7 +220,7 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log)
     if (!XMLHelper::isNodeNamed(e, shibspconstants::SHIB2ATTRIBUTEMAP_NS, Attributes))
         throw ConfigurationException("XML AttributeExtractor requires am:Attributes at root of configuration.");
 
-    DOMElement* child = XMLHelper::getLastChildElement(e, shibspconstants::SHIB2ATTRIBUTEMAP_NS, _MetadataProvider);
+    DOMElement* child = XMLHelper::getFirstChildElement(e, shibspconstants::SHIB2ATTRIBUTEMAP_NS, _MetadataProvider);
     if (child) {
         try {
             auto_ptr_char type(child->getAttributeNS(NULL, _type));
@@ -244,7 +244,7 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log)
     }
 
     if (m_entityAssertions) {
-        child = XMLHelper::getLastChildElement(e, shibspconstants::SHIB2ATTRIBUTEMAP_NS, _TrustEngine);
+        child = XMLHelper::getFirstChildElement(e, shibspconstants::SHIB2ATTRIBUTEMAP_NS, _TrustEngine);
         if (child) {
             try {
                 auto_ptr_char type(child->getAttributeNS(NULL, _type));
@@ -263,7 +263,7 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log)
     }
 
     if (m_entityAssertions) {
-        child = XMLHelper::getLastChildElement(e, shibspconstants::SHIB2ATTRIBUTEMAP_NS, _AttributeFilter);
+        child = XMLHelper::getFirstChildElement(e, shibspconstants::SHIB2ATTRIBUTEMAP_NS, _AttributeFilter);
         if (child) {
             try {
                 auto_ptr_char type(child->getAttributeNS(NULL, _type));