native-xml'; } // // Submission conversion functions // /** * Create and return a submission node. * @param $doc DOMDocument * @param $submission Submission * @return DOMElement */ function createSubmissionNode($doc, $submission) { $deployment = $this->getDeployment(); $submissionNode = parent::createSubmissionNode($doc, $submission); // Add the series, if one is designated. if ($sectionId = $submission->getSectionId()) { $sectionDao = DAORegistry::getDAO('SectionDAO'); $section = $sectionDao->getById($sectionId, $submission->getContextId()); assert(isset($section)); $submissionNode->setAttribute('section_ref', $section->getLocalizedAbbrev()); } $publishedArticleDao = DAORegistry::getDAO('PublishedArticleDAO'); $publishedArticle = $publishedArticleDao->getByArticleId($submission->getId()); $publishedArticle ? $submissionNode->setAttribute('seq', $publishedArticle->getSequence()) : $submissionNode->setAttribute('seq', '0'); $publishedArticle ? $submissionNode->setAttribute('access_status', $publishedArticle->getAccessStatus()) : $submissionNode->setAttribute('access_status', '0'); // if this is a published article and not part/subelement of an issue element // add issue identification element if ($publishedArticle && !$deployment->getIssue()) { $issueDao = DAORegistry::getDAO('IssueDAO'); $issue = $issueDao->getById($publishedArticle->getIssueId()); import('plugins.importexport.native.filter.NativeFilterHelper'); $nativeFilterHelper = new NativeFilterHelper(); $submissionNode->appendChild($nativeFilterHelper->createIssueIdentificationNode($this, $doc, $issue)); } $pages = $submission->getPages(); if (!empty($pages)) $submissionNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'pages', htmlspecialchars($pages, ENT_COMPAT, 'UTF-8'))); return $submissionNode; } } ?>