class QPXSL in QueryPath 6
Same name and namespace in other branches
Hierarchy
- class \QPXSL implements QueryPathExtension
Expanded class hierarchy of QPXSL
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
QPXSL:: |
protected | property | ||
QPXSL:: |
public | function | ||
QPXSL:: |
public | function |
Overrides QueryPathExtension:: |