Exemplo n.º 1
0
 public override void LoadInnerXml(XmlNodeList nodeList)
 {
     if (nodeList == null)
     {
         throw new System.Security.Cryptography.CryptographicException(SR.Cryptography_Xml_UnknownTransform);
     }
     ExceptUris.Clear();
     foreach (XmlNode node in nodeList)
     {
         XmlElement elem = node as XmlElement;
         if (elem != null)
         {
             if (elem.LocalName == "Except" && elem.NamespaceURI == XmlNameSpace.Url[NS.XmlDecryptionTransformNamespaceUrl])
             {
                 string uri = ElementUtils.GetAttribute(elem, "URI", NS.XmlDecryptionTransformNamespaceUrl);
                 if (uri == null || uri.Length == 0 || uri[0] != '#')
                 {
                     throw new System.Security.Cryptography.CryptographicException(SR.Cryptography_Xml_UriRequired);
                 }
                 if (!ElementUtils.VerifyAttributes(elem, "URI"))
                 {
                     throw new System.Security.Cryptography.CryptographicException(SR.Cryptography_Xml_UnknownTransform);
                 }
                 string idref = ParserUtils.ExtractIdFromLocalUri(uri);
                 ExceptUris.Add(idref);
             }
             else
             {
                 throw new System.Security.Cryptography.CryptographicException(SR.Cryptography_Xml_UnknownTransform);
             }
         }
     }
 }