documentElement; $journal = $request->getJournal(); $journalId = $journal->getId(); // Search $root->appendChild($this->_createUrlTree($doc, $request->url($journal->getPath(), 'search'))); // Issues $issueDao = DAORegistry::getDAO('IssueDAO'); $publishedArticleDao = DAORegistry::getDAO('PublishedArticleDAO'); $galleyDao = DAORegistry::getDAO('ArticleGalleyDAO'); if ($journal->getSetting('publishingMode') != PUBLISHING_MODE_NONE) { $root->appendChild($this->_createUrlTree($doc, $request->url($journal->getPath(), 'issue', 'current'))); $root->appendChild($this->_createUrlTree($doc, $request->url($journal->getPath(), 'issue', 'archive'))); $publishedIssues = $issueDao->getPublishedIssues($journalId); while ($issue = $publishedIssues->next()) { $root->appendChild($this->_createUrlTree($doc, $request->url($journal->getPath(), 'issue', 'view', $issue->getId()))); // Articles for issue $articles = $publishedArticleDao->getPublishedArticles($issue->getId()); foreach($articles as $article) { // Abstract $root->appendChild($this->_createUrlTree($doc, $request->url($journal->getPath(), 'article', 'view', array($article->getBestArticleId())))); // Galley files $galleys = $galleyDao->getBySubmissionId($article->getId()); while ($galley = $galleys->next()) { $root->appendChild($this->_createUrlTree($doc, $request->url($journal->getPath(), 'article', 'view', array($article->getBestArticleId(), $galley->getBestGalleyId())))); } } } } $doc->appendChild($root); // Enable plugins to change the sitemap HookRegistry::call('SitemapHandler::createJournalSitemap', array(&$doc)); return $doc; } } ?>