You are here

QPXSL.php in QueryPath 7.2

Same filename and directory in other branches
  1. 6 QueryPath/Extension/QPXSL.php
  2. 7.3 QueryPath/Extension/QPXSL.php

File

QueryPath/Extension/QPXSL.php
View source
<?php

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));
  }

}
QueryPathExtensionRegistry::extend('QPXSL');

Classes

Namesort descending Description
QPXSL