Example #1
0
 /**
  * Generates standard ODT meta data into the given $odt.
  *
  * Extracts the <office:meta/> element from the given $odt or creates a new 
  * one, if it does not exsist, and generates standard meta data into it.
  * 
  * @param DOMDocument $odt 
  */
 private function generateMetaData(DOMDocument $odt)
 {
     $metaSections = $odt->getElementsByTagnameNS(ezcDocumentOdt::NS_ODT_OFFICE, 'meta');
     if ($metaSections->length === 0) {
         $metaSection = $odt->documentElement->appendChild($odt->createElementNS(ezcDocumentOdt::NS_ODT_OFFICE, 'meta'));
     } else {
         $metaSection = $metaSections->item(0);
     }
     $this->metaGenerator->generateMetaData($metaSection);
 }