X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fsignature%2FContentReference.cpp;fp=saml%2Fsignature%2FContentReference.cpp;h=ffc77081710164e62152db90a6fa8a32f2081b1a;hb=f981de70de3d002dba3964b80ff7e9f964ba59c1;hp=80f248abd3c0c6f7061ed16aa06af45940aac526;hpb=91925e3c549d33179ccc2d806b5974d33aa70a8a;p=shibboleth%2Fcpp-opensaml.git diff --git a/saml/signature/ContentReference.cpp b/saml/signature/ContentReference.cpp index 80f248a..ffc7708 100644 --- a/saml/signature/ContentReference.cpp +++ b/saml/signature/ContentReference.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -94,8 +94,11 @@ void ContentReference::addInclusivePrefix(const XMLCh* prefix) void ContentReference::addPrefixes(const std::set& namespaces) { - for (set::const_iterator n = namespaces.begin(); n!=namespaces.end(); ++n) - addInclusivePrefix(n->getNamespacePrefix()); + for (set::const_iterator n = namespaces.begin(); n!=namespaces.end(); ++n) { + // Check for xmlns:xml. + if (!XMLString::equals(n->getNamespacePrefix(), xmlconstants::XML_PREFIX) || !XMLString::equals(n->getNamespaceURI(), xmlconstants::XML_NS)) + addInclusivePrefix(n->getNamespacePrefix()); + } } void ContentReference::addPrefixes(const XMLObject& xmlObject)