public function getOutput($filename = NULL)
 {
     if ($filename) {
         $this->setFilename($filename);
     }
     $output = parent::getOutput();
     $json = json_decode($output);
     if (!is_null($this->updated_date)) {
         $json->update = $this->updated_date;
     }
     $json->path .= 'v' . $this->version;
     $json->version = (string) $this->version;
     $json->{'article-version-id'} = ltrim($json->{'elocation-id'}, 'e') . '.' . $this->version;
     if (isset($json->fragments)) {
         $json->fragments = $this->addFragmentPaths($json->fragments, $json->path);
     }
     $output = json_encode($json, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
     if ($this->validate($output)) {
         return $output;
     }
 }
 /**
  * @param XMLString $xml
  */
 public function __construct(XMLString $xml)
 {
     parent::__construct($xml, 'ris');
 }