protected function appendXmlPublicKey(\DOMDocument $keyDoc, $objectId)
	{
		// create the document structure if necessary
		if (is_null($this->doc))
		{
			$this->createXmlStructure();
		}
		
		// local the node to which the key will be appended
		$keyValue = $this->doc->getElementsByTagName($this->nodeNsPrefix . 'KeyValue')->item(0);
		if (is_null($keyValue))
		{
			throw new \UnexpectedValueException('Unabled to locate the KeyValue node');
		}
		
		// we have to add the proper namespace prefixes to all of the nodes in the public key DOM
		$publicKeyNode = $this->doc->createElement($this->nodeNsPrefix . $keyDoc->firstChild->nodeName);
		$keyValue->appendChild($publicKeyNode);
		
		foreach ($keyDoc->firstChild->childNodes as $node)
		{
			$newNode = $this->doc->createElement($this->nodeNsPrefix . $node->nodeName, $node->nodeValue);
			$publicKeyNode->appendChild($newNode);
		}
		
		// add the id attribute, if its provided
		if (is_string($objectId) && strlen($objectId))
		{
			$keyValue->parentNode->setAttribute('Id', $objectId);
		}
		
		return true;
	}