function generateIssueDiv(&$doc, &$root, &$issue) { $pDiv =& XMLCustomWriter::createElement($doc, 'METS:div'); XMLCustomWriter::setAttribute($pDiv, 'TYPE', 'issue'); XMLCustomWriter::setAttribute($pDiv, 'DMDID', 'I-' . $issue->getId()); $sectionDao =& DAORegistry::getDAO('SectionDAO'); $sectionArray =& $sectionDao->getSectionsForIssue($issue->getId()); $i = 0; while ($i < sizeof($sectionArray)) { MetsExportDom::generateSectionDiv($doc, $pDiv, $sectionArray[$i], $issue); $i++; } XMLCustomWriter::appendChild($root, $pDiv); }