/**
  * Write a XRDS document
  *
  * Writes a XRDS document specifying the OMB service. Optionally uses a
  * given object of a class implementing OMB_XRDS_Writer for output. Else
  * OMB_Plain_XRDS_Writer is used.
  *
  * @param OMB_XRDS_Mapper $xrds_mapper An object mapping actions to URLs
  * @param OMB_XRDS_Writer $xrds_writer Optional; The OMB_XRDS_Writer used to
  *                                     write the XRDS document
  *
  * @access public
  *
  * @return mixed Depends on the used OMB_XRDS_Writer; OMB_Plain_XRDS_Writer
  *               returns nothing.
  */
 public function writeXRDS($xrds_mapper, $xrds_writer = null)
 {
     if ($xrds_writer == null) {
         require_once 'plain_xrds_writer.php';
         $xrds_writer = new OMB_Plain_XRDS_Writer();
     }
     return $xrds_writer->writeXRDS($this->user, $xrds_mapper);
 }