From: Scott Cantor Date: Sun, 11 Jun 2006 19:24:04 +0000 (+0000) Subject: Fixed wildcard element processing. X-Git-Tag: 1.0-alpha1~231 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-xmltooling.git;a=commitdiff_plain;h=63628ac851db55a3ee9ac5b74d1b204242229662 Fixed wildcard element processing. --- diff --git a/xmltooling/encryption/impl/EncryptionImpl.cpp b/xmltooling/encryption/impl/EncryptionImpl.cpp index 324f8f6..1f5c54a 100644 --- a/xmltooling/encryption/impl/EncryptionImpl.cpp +++ b/xmltooling/encryption/impl/EncryptionImpl.cpp @@ -109,8 +109,10 @@ namespace xmlencryption { // Unknown child. const XMLCh* nsURI=root->getNamespaceURI(); - if (!XMLString::equals(nsURI,XMLConstants::XMLENC_NS) && nsURI && *nsURI) + if (!XMLString::equals(nsURI,XMLConstants::XMLENC_NS) && nsURI && *nsURI) { getOtherParameters().push_back(childXMLObject); + return; + } AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } diff --git a/xmltooling/signature/impl/KeyInfoImpl.cpp b/xmltooling/signature/impl/KeyInfoImpl.cpp index 587591d..3745cd0 100644 --- a/xmltooling/signature/impl/KeyInfoImpl.cpp +++ b/xmltooling/signature/impl/KeyInfoImpl.cpp @@ -232,8 +232,10 @@ namespace xmlsignature { // Unknown child. const XMLCh* nsURI=root->getNamespaceURI(); - if (!XMLString::equals(nsURI,XMLConstants::XMLSIG_NS) && nsURI && *nsURI) + if (!XMLString::equals(nsURI,XMLConstants::XMLSIG_NS) && nsURI && *nsURI) { setOtherKeyValue(childXMLObject); + return; + } AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } @@ -285,8 +287,10 @@ namespace xmlsignature { // Unknown child. const XMLCh* nsURI=root->getNamespaceURI(); - if (!XMLString::equals(nsURI,XMLConstants::XMLSIG_NS) && nsURI && *nsURI) + if (!XMLString::equals(nsURI,XMLConstants::XMLSIG_NS) && nsURI && *nsURI) { getXMLObjects().push_back(childXMLObject); + return; + } AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } @@ -505,8 +509,10 @@ namespace xmlsignature { // Unknown child. const XMLCh* nsURI=root->getNamespaceURI(); - if (!XMLString::equals(nsURI,XMLConstants::XMLSIG_NS) && nsURI && *nsURI) + if (!XMLString::equals(nsURI,XMLConstants::XMLSIG_NS) && nsURI && *nsURI) { getOtherX509Datas().push_back(childXMLObject); + return; + } AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } @@ -629,8 +635,10 @@ namespace xmlsignature { // Unknown child. const XMLCh* nsURI=root->getNamespaceURI(); - if (!XMLString::equals(nsURI,XMLConstants::XMLSIG_NS) && nsURI && *nsURI) + if (!XMLString::equals(nsURI,XMLConstants::XMLSIG_NS) && nsURI && *nsURI) { getPGPDataExtensions().push_back(childXMLObject); + return; + } AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } @@ -737,8 +745,10 @@ namespace xmlsignature { // Unknown child. const XMLCh* nsURI=root->getNamespaceURI(); - if (!XMLString::equals(nsURI,XMLConstants::XMLSIG_NS) && nsURI && *nsURI) + if (!XMLString::equals(nsURI,XMLConstants::XMLSIG_NS) && nsURI && *nsURI) { getOthers().push_back(childXMLObject); + return; + } AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); }