/** * @param XMLString $xml */ public function __construct(XMLString $xml) { $xsl = XSLString::fromString(file_get_contents(dirname(__FILE__) . '/../../../lib/xsl/jats-to-html.xsl')); parent::__construct($xml, $xsl); $this->html = $this->getOutput(); }
/** * @param XMLString $xml * @param string $type * * @throws InvalidArgumentException */ public function __construct(XMLString $xml, $type = 'bibtex') { Assert\that($type)->string()->regex('#^(bibtex|ris)$#'); $xsl = XSLString::fromString(file_get_contents(dirname(__FILE__) . '/../../../lib/xsl/jats-to-' . $type . '.xsl')); parent::__construct($xml, $xsl); }