function createPublisherNode($doc, $journalLocalePrecedence)
{
$deployment = $this->getDeployment();
$context = $deployment->getContext();
$publisherNode = $doc->createElementNS($deployment->getNamespace(), 'Publisher');
// Publishing role (mandatory)
$publisherNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'PublishingRole', O4DOI_PUBLISHING_ROLE_PUBLISHER));
// Publisher name (mandatory)
$publisher = $context->getSetting('publisherInstitution');
if (empty($publisher)) {
// Use the journal title if no publisher is set.
// This corresponds to the logic implemented for OAI interfaces, too.
$publisher = $this->getPrimaryTranslation($context->getName(null), $journalLocalePrecedence);
}
assert(!empty($publisher));
$publisherNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'PublisherName', htmlspecialchars($publisher, ENT_COMPAT, 'UTF-8')));
return $publisherNode;
}