コード例 #1
0
 /**
  * @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();
 }
コード例 #2
0
 /**
  * @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);
 }