You are here

class QPXSL in QueryPath 6

Same name and namespace in other branches
  1. 7.3 QueryPath/Extension/QPXSL.php \QPXSL
  2. 7.2 QueryPath/Extension/QPXSL.php \QPXSL

Hierarchy

Expanded class hierarchy of QPXSL

1 string reference to 'QPXSL'
QPXSL.php in QueryPath/Extension/QPXSL.php

File

QueryPath/Extension/QPXSL.php, line 5

View source
class QPXSL implements QueryPathExtension {
  protected $src = NULL;
  public function __construct(QueryPath $qp) {
    $this->src = $qp;
  }
  public function xslt($style) {
    if (!$style instanceof QueryPath) {
      $style = qp($style);
    }
    $sourceDoc = $this->src
      ->top()
      ->get(0)->ownerDocument;
    $styleDoc = $style
      ->get(0)->ownerDocument;
    $processor = new XSLTProcessor();
    $processor
      ->importStylesheet($styleDoc);
    return qp($processor
      ->transformToDoc($sourceDoc));
  }

}

Members