function exportIssues(&$journal, &$issues)
 {
     $this->import('MetsExportDom');
     $doc =& XMLCustomWriter::createDocument('', null);
     $root =& XMLCustomWriter::createElement($doc, 'METS:mets');
     XMLCustomWriter::setAttribute($root, 'xmlns:METS', 'http://www.loc.gov/METS/');
     XMLCustomWriter::setAttribute($root, 'xmlns:xlink', 'http://www.w3.org/TR/xlink');
     XMLCustomWriter::setAttribute($root, 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
     XMLCustomWriter::setAttribute($root, 'PROFILE', 'Australian METS Profile 1.0');
     XMLCustomWriter::setAttribute($root, 'TYPE', 'journal');
     XMLCustomWriter::setAttribute($root, 'OBJID', 'J-' . $journal->getJournalId());
     XMLCustomWriter::setAttribute($root, 'xsi:schemaLocation', 'http://www.loc.gov/METS/ http://www.loc.gov/mets/mets.xsd');
     $HeaderNode =& MetsExportDom::createmetsHdr($doc);
     XMLCustomWriter::appendChild($root, $HeaderNode);
     MetsExportDom::generateJournalDmdSecDom($doc, $root, $journal);
     $fileSec =& XMLCustomWriter::createElement($doc, 'METS:fileSec');
     $fileGrpOriginal =& XMLCustomWriter::createElement($doc, 'METS:fileGrp');
     XMLCustomWriter::setAttribute($fileGrpOriginal, 'USE', 'original');
     $fileGrpDerivative =& XMLCustomWriter::createElement($doc, 'METS:fileGrp');
     XMLCustomWriter::setAttribute($fileGrpDerivative, 'USE', 'derivative');
     foreach ($issues as $issue) {
         MetsExportDom::generateIssueDmdSecDom($doc, $root, $issue, $journal);
         MetsExportDom::generateIssueFileSecDom($doc, $fileGrpOriginal, $issue);
         MetsExportDom::generateIssueHtmlGalleyFileSecDom($doc, $fileGrpDerivative, $issue);
     }
     $amdSec =& MetsExportDom::createmetsamdSec($doc, $root, $journal);
     XMLCustomWriter::appendChild($root, $amdSec);
     XMLCustomWriter::appendChild($fileSec, $fileGrpOriginal);
     XMLCustomWriter::appendChild($fileSec, $fileGrpDerivative);
     XMLCustomWriter::appendChild($root, $fileSec);
     MetsExportDom::generateStructMap($doc, $root, $journal, $issues);
     XMLCustomWriter::appendChild($doc, $root);
     header("Content-Type: application/xml");
     header("Cache-Control: private");
     header("Content-Disposition: attachment; filename=\"" . $journal->getPath() . "-mets.xml\"");
     XMLCustomWriter::printXML($doc);
     return true;
 }