diff --git a/plugins/importexport/onix30/filter/MonographONIX30XmlFilter.inc.php b/plugins/importexport/onix30/filter/MonographONIX30XmlFilter.inc.php index 7ca4c146054..f204af48297 100644 --- a/plugins/importexport/onix30/filter/MonographONIX30XmlFilter.inc.php +++ b/plugins/importexport/onix30/filter/MonographONIX30XmlFilter.inc.php @@ -201,7 +201,7 @@ function createProductNode($doc, $submission, $publicationFormat) { $descDetailNode = $doc->createElementNS($deployment->getNamespace(), 'DescriptiveDetail'); $descDetailNode->appendChild($this->_buildTextNode($doc, 'ProductComposition', - $publicationFormat->getProductCompositionCode() ? $publicationFormat->getProductCompositionCode() : '00')); // single item, trade only, etc. Default to single item if not specified. + $publicationFormat->getProductCompositionCode() ? $publicationFormat->getProductCompositionCode() : '00')); // single item, trade only, etc. Default to single item if not specified. $descDetailNode->appendChild($this->_buildTextNode($doc, 'ProductForm', $publicationFormat->getEntryKey())); // paperback, hardcover, etc @@ -237,7 +237,7 @@ function createProductNode($doc, $submission, $publicationFormat) { } } - if($publicationFormat->getCountryManufactureCode() != '') { + if ($publicationFormat->getCountryManufactureCode() != '') { $descDetailNode->appendChild($this->_buildTextNode($doc, 'CountryOfManufacture', $publicationFormat->getCountryManufactureCode())); } @@ -412,7 +412,7 @@ function createProductNode($doc, $submission, $publicationFormat) { $subjectNode->appendChild($this->_buildTextNode($doc, 'SubjectSchemeVersion', '2')); // Version 2 of ^^ $submissionSubjectDao = DAORegistry::getDAO('SubmissionSubjectDAO'); - $allSubjects = $submissionSubjectDao->getSubjects($publication->getId(), array_keys(AppLocale::getSupportedFormLocales())); + $allSubjects = $submissionSubjectDao->getSubjects($publication->getId(), array_keys(AppLocale::getSupportedFormLocales())); $uniqueSubjects = array(); foreach ($allSubjects as $locale => $subjects) { $uniqueSubjects = array_merge($uniqueSubjects, $subjects); @@ -515,6 +515,19 @@ function createProductNode($doc, $submission, $publicationFormat) { $websiteNode->appendChild($this->_buildTextNode($doc, 'WebsiteRole', '18')); // 18 -> Publisher's B2C website $websiteNode->appendChild($this->_buildTextNode($doc, 'WebsiteLink', $request->url($context->getPath()))); + $websiteNode = $doc->createElementNS($deployment->getNamespace(), 'Website'); + $publisherNode->appendChild($websiteNode); + + $websiteNode->appendChild($this->_buildTextNode($doc, 'WebsiteRole', '29')); // 29 -> Web page for full content + + $submissionBestId = $publication->getData('submissionId'); + + if ($publication->getData('urlPath') != '') { + $submissionBestId = $publication->getData('urlPath'); + } + + $websiteNode->appendChild($this->_buildTextNode($doc, 'WebsiteLink', $request->url($context->getPath(), 'catalog', 'book', $submissionBestId))); + /* --- Publishing Dates --- */ $publicationDates = $publicationFormat->getPublicationDates(); @@ -672,6 +685,12 @@ function createProductNode($doc, $submission, $publicationFormat) { unset($supplierWebsiteNode); } + + $supplierWebsiteNode = $doc->createElementNS($deployment->getNamespace(), 'Website'); + $supplierNode->appendChild($supplierWebsiteNode); + + $supplierWebsiteNode->appendChild($this->_buildTextNode($doc, 'WebsiteRole', '29')); // 29 -> Web page for full content + $supplierWebsiteNode->appendChild($this->_buildTextNode($doc, 'WebsiteLink', $request->url($context->getPath(), 'catalog', 'book', $submissionBestId))); unset($supplierNode); unset($supplierWebsiteNode);