
<?php

  public function executeLinkBlock(sfWebRequest $request)
  {
    // create the document
    $doc = new sfTinyDoc();
    $doc->createFrom(array('extension' => $request->getParameter('extension', 'odt')));
    $doc->loadXml('content.xml');
    $doc->mergeXmlBlock('data',
      array(
        array(
          'manufacturer' => 'CentOS',
          'url'          => 'http://www.centos.org',
          'os'           => 'CentOS 5.2',
          'os_type'      => 'Linux',
        ),
        array(
          'manufacturer' => 'Debian',
          'url'          => 'http://www.debian.org',
          'os'           => 'Debian GNU/Linux 5.0',
          'os_type'      => 'Linux',
        ),
        array(
          'manufacturer' => 'Ubuntu',
          'url'          => 'http://www.ubuntu.com',
          'os'           => 'Ubuntu 9.04',
          'os_type'      => 'Linux',
        ),
        array(
          'manufacturer' => 'Apple',
          'url'          => 'http://www.apple.com',
          'os'           => 'Mac OS X Leopard',
          'os_type'      => 'Mac OS',
        ),
        array(
          'manufacturer' => 'Microsoft',
          'url'          => 'http://www.microsoft.com',
          'os'           => 'Windows XP',
          'os_type'      => 'Windows',
        ),
      )
    );
    $doc->saveXml();
    $doc->close();

    // send and remove the document
    $doc->sendResponse();
    $doc->remove();

    throw new sfStopException;
  }

?>
