/** * creates the METS:dmdSec element for a Sheduled Conference */ function generateSchedConfDmdSecDom(&$doc, &$root, &$conference, &$schedConf) { $dmdSec =& XMLCustomWriter::createElement($doc, 'METS:dmdSec'); XMLCustomWriter::setAttribute($dmdSec, 'ID', 'SCHC-' . $schedConf->getId()); $mdWrap =& XMLCustomWriter::createElement($doc, 'METS:mdWrap'); $xmlData =& XMLCustomWriter::createElement($doc, 'METS:xmlData'); XMLCustomWriter::setAttribute($mdWrap, 'MDTYPE', 'MODS'); $mods =& XMLCustomWriter::createElement($doc, 'mods:mods'); XMLCustomWriter::setAttribute($mods, 'xmlns:mods', 'http://www.loc.gov/mods/v3'); XMLCustomWriter::setAttribute($root, 'xsi:schemaLocation', str_replace(' http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-0.xsd', '', $root->getAttribute('xsi:schemaLocation')) . ' http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-0.xsd'); $titleInfo =& XMLCustomWriter::createElement($doc, 'mods:titleInfo'); XMLCustomWriter::createChildWithText($doc, $titleInfo, 'mods:title', $schedConf->getLocalizedName()); XMLCustomWriter::appendChild($mods, $titleInfo); XMLCustomWriter::createChildWithText($doc, $mods, 'mods:genre', 'conference'); if ($schedConf->getStartDate() != '' || $schedConf->getEndDate() != '') { $originInfo =& XMLCustomWriter::createElement($doc, 'mods:originInfo'); if ($schedConf->getStartDate() != '') { $sDate = XMLCustomWriter::createChildWithText($doc, $originInfo, 'mods:dateOther', $schedConf->getStartDate()); XMLCustomWriter::setAttribute($sDate, 'point', 'start'); } if ($schedConf->getEndDate() != '') { $sDate = XMLCustomWriter::createChildWithText($doc, $originInfo, 'mods:dateOther', $schedConf->getEndDate()); XMLCustomWriter::setAttribute($sDate, 'point', 'end'); } XMLCustomWriter::appendChild($mods, $originInfo); } XMLCustomWriter::appendChild($xmlData, $mods); XMLCustomWriter::appendChild($dmdSec, $mdWrap); XMLCustomWriter::appendChild($mdWrap, $xmlData); XMLCustomWriter::appendChild($root, $dmdSec); MetsExportDom::generateOverViewDmdSecDom($doc, $root, $schedConf); $publishedPaperDao = DAORegistry::getDAO('PublishedPaperDAO'); $publishedPapersIterator =& $publishedPaperDao->getPublishedPapers($schedConf->getId()); $publishedPaperArray =& $publishedPapersIterator->toArray(); $i = 0; while ($i < sizeof($publishedPaperArray)) { MetsExportDom::generatePublishedPaperDmdSecDom($doc, $root, $publishedPaperArray[$i], $conference, $schedConf); $i++; } }